In this article, we will see two different ways how to fix NVM Error – exit status 1: Access is denied Error in Windows 10 and 11.
What is NVM?
NVM is the Node Version Management Utility program for Windows that lets users use different versions of Node on their computers. It lets us toggle it between node versions depending on the version we want.
For example, type
npm list in the command line to get the list. I am using two versions of node.
To change the version we use the command
nvm use <node version>.
What is NVM exit status 1 error ?
However, sometimes when we want to use a different node version using
nvm use command, we encounter the “exit status 1: Access is denied” nvm error.
This error is caused because we are trying to run
nvm.exe without appropriate permission. And without permission, nvm cannot create a symlink to redirect the node installation path to the correct installation.
So here we will see three common fixes to this error that works with most users.
To fix the “nvm exit ststus 1 error” we need to:
- Run command line tool as Admin
- Enable Windows Developer Mode
- Proper installation of nvm-windows in windows
Run Command line tool as Administrator.
As stated in their official repo document, the
nvm-windows runs in an Admin shell, so we need to give the command prompt or the powershell administrator permission when starting it.
Just right-click the command prompt and choose Run as administrator.
Once the admin right is given, it can create the symlink and we won’t get the error.
Enable Developer mode in windows
The next fix is to enable the developer mode in Windows 10 or windows 11.
NVM4W 1.1.8 version introduced the support for
developer mode. Once enable we dont have open the command line with admin permission every time.
To enable developer mode in windows 10, goto Settings > Update & Security > For Developers and then turn on the Developer Mode.
The above two methods usually solve the issue, if not, then re-install of nvm-windows properly in your system.
Proper Install nvm-windows (Step-by-step)
If the above solution did not solve the “nvm exit status 1 error“, then follow this step to reinstall nvm-windows correctly.
Before installation, make sure:
- Developer mode is Enable on windows
- Uninstall all previously installed node and npm versions.
- Create the following folder in your C drive
C:nvm4w C:nvm4wnodejs C:nvm4wnvm
- Run the installer
nvm.exeas administrator and use the folders created above to install the files instead of the default ones while installing.
- Once installations is completed, close all the terminal. And then open a new one and check.
nvm -version, to check if it’s installed properly.
To install the latest version of node use the command.
nvm install --lts
And to install another specific version of node (eg 14.17.3)
nvm install 14.17.3
Now to check the list of the installed version of node, use the command:
Hope the above solutions have fixed the “exit status 1: Access is denied” nvm error.