Laveen Ren
Laveen Ren

Reputation: 415

nvm use exit status 1: Access is denied

I had installed nodejs before without nvm and then deleted it completely by uninstalling and deleting all files.

I am using windows 10.

It works when I use run powershell as administrator, but I am unable to use yarn in vscode.

PS C:\Users\laveen> nvm ls

No installations recognized.
PS C:\Users\laveen> nvm install 14.18.1
Downloading node.js version 14.18.1 (64-bit)...
Complete
Creating C:\Users\laveen\AppData\Roaming\nvm\temp

Downloading npm version 6.14.15... Complete
Installing npm v6.14.15...

Installation complete. If you want to use this version, type

nvm use 14.18.1
PS C:\Users\laveen> nvm use 14.18.1
exit status 1: Access is denied.

Upvotes: 11

Views: 22942

Answers (6)

raydel comas
raydel comas

Reputation: 1

Maybe you need use:

  1. nvm off
  2. nvm on

Upvotes: 0

Mouneer
Mouneer

Reputation: 13489

My case with nvm-windows version 1.1.9: Switching node version requires elevated Powershell (run as administrator). It is recommended to use version 1.1.7 to avoid this issue.

Upvotes: 0

Jeevan
Jeevan

Reputation: 1

The issue is you have run command prompt as administrator, then it will work enter image description here

Upvotes: -1

Feroz Khan
Feroz Khan

Reputation: 1010

1.Run the same command as administrator command window like shown in image

2.nvm use 14.8.1

enter image description here

Upvotes: 10

Ganesh Udmale
Ganesh Udmale

Reputation: 425

First check node is properly install in your system

  1. Open CMD/Git CMD as administrator (Press Windows+R Type “cmd” and then press Ctrl+Shift+Enter)
  2. Check list of Node version ( nvm list )
  3. Use specific node version ( nvm use 17.7.1 )

enter image description here

Upvotes: 1

umesh sharma
umesh sharma

Reputation: 161

run command prompt as administrator.

Upvotes: 16

Related Questions