nvm-windows: exit status 1: Access is denied
Issue: i get access is denied when i try to use specific version of node
How To Reproduce:
i installed 2 version node 14 and node 16
when trying to use node version 14 by typing nvm use 14.18.2
i get this error
same error happens when using v16
Expected Behavior: It should use node version i choose to use
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 17 (3 by maintainers)
@CASPERg267 try to open the CMD as administrator
Please update the guide:
Checklist before installing nvm-windows
– c:\nvm4w – c:\nvm4w\nodejs – c:\nvm4w\nvm
Run the installer as an administrator.
Test everything is ok
Run it
@danilopolani is correct - see https://github.com/coreybutler/nvm-windows/wiki/Common-Issues#permissions-exit-1-exit-5-access-denied-exit-145
Even then, not everyone has administrative rights to the computer (some of us work with impossed restrictive policies) and as of testing it today with developer mode activated, this no longer works as intended (i.e. I have developer mode active, yet I get access denied when issuing an nvm use command).
curious that this has only become an issue lately…what has changed?
Ideally this would be addressed with a UAC dialog for those of who have local admin privileges but are not able to enable a Developer mode (likely due to running on an older version of Win10 or due to being locked out because of group policy restrictions).
Would you be willing to add the option to configure
nvm
to enable this alternative approach?@coreybutler To reduce the number of people having this confusing problem, it might be a good idea to modify NVM4W to check whether it has administrative permissions proactively at launch, and display a meaningful warning. Or even link to the relevant README. I’ve found that it’s possible to get into some quite odd states because some NVM4W commands work without admin permissions but some do not.
same issue here 😦
@terryjiang2020 has correctly cited that Windows protects some directories, even if you have developer mode enabled.
Per the suggestion, I’ve added the following change to the wiki:
Can confirm that even with developer mode enabled, the access denied error still happens. Windows 10, 20H2, build 19042.1645.
Can also confirm that I can create symbolic links manually from a non-administrator powershell session: