Access Denied after Switching NodeJS Version | Fix Access Denied Error in Node JS

preview_player
Показать описание
Solution for access denied issue with NVM and GIT in Windows while switching NodeJS version. I installed NVM on Windows. NVM is NodeJS Version Manager. It gives us ability to use any version of NodeJS. We can switch NodeJS version by using it easily. After NVM installation, we install NodeJS vesrion and then we switch to that installed version. We have to give a command like nvm use and then NodeJS version that we have installed to use it. I am using Git for Windows as terminal program. It gave error of 'Access is Denied' and could not switch to specified NodeJS version.

Error is like:
Exit status 1: Access is Denied

To fix this error
Search Git
Open its location
Right click, select properties
Check option that says 'Run as Administrator'

Open Git Bash
Run command
nvm use 'node version number'
i.e. nvm use 17.2.0

It will switch to that version successfully. We used Git as administrator because we are giving commands by using Git or terminal. Basically, use NVM and terminal program under administrator privileges.

Problem solved.

Thank You!
👍 LIKE VIDEO
👊 SUBSCRIBE
🔔 PRESS BELL ICON
✍️ COMMENT

#webstylepress #webdevelopment #nodejs #nvm #git #windows #gitbash #tutorial
Рекомендации по теме
Комментарии
Автор

thank you a lot!!! i used 30 mins for this problem until found this video.

tkofflm
Автор

Solucionó mi problema ¡Muchas gracias!

emiliomachado
Автор

When using NVM for windows and switching between node versions when I try 'gulp serve' in VS code I get "gulp : The term 'gulp' is not recognized as the name of a

Why is this?

johanvandyk
Автор

so it's just enabling us to run it without right-clicking it and clicking "run as administrator" right?

roughysk
Автор

No me funciono.... Me pone error err_access_debied_error access denied for user 'root'@'localhost' (using password: yes)

anonymushadow
Автор

Or just run your terminal (cmd) as admin

bluffrockstar
Автор

can u please help me with this error
Program 'npm.cmd' failed to run: Access is deniedAt line:1 char:1
+ npm start
+
At line:1 char:1
+ npm start
+
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed

bhaskarlabhargavi