I have 2 versions of node.js , as follow:-
Your environment has been set up for using Node.js 17.1.0 (x64) and npm.
C:\Windows\System32>nvm list
16.13.0
8.16.2
but when i try to use the first version i got this error:-
C:\Windows\System32>nvm use 8.16.2
node v8.16.2 (64-bit) is not installed.
and when i try to use the second version i got this:-
C:\Windows\System32>nvm use 16.13.0
exit status 145: The directory is not empty.
so what is going on? thanks
How to install npm via Node. Now that nvm is installed, we're ready to do what we really wanted to do in the first place: install npm and Node on our system. It's not a bad idea to confirm nvm is installed properly, by running nvm -v . If the terminal shows you the installed version number, you're good to go!
NVM allows you to uninstall Node versions that are no longer required. Run the command nvm uninstall with the version of Node you'd like to remove. You cannot remove a version you are currently using, so you must switch to a different version first. NVM confirms the Node version has been removed.
NVM (Node Version Manager) is the best way to run multiple versions of NodeJS on the same machine. It's not only for Windows but in this post I will talk about my experience to install NVM on a Windows machine without Admin Rights.
node.js - "nvm use 16.13.0" will return this error "exit status 145: The directory is not empty." - Stack Overflow "nvm use 16.13.0" will return this error "exit status 145: The directory is not empty." Your environment has been set up for using Node.js 17.1.0 (x64) and npm.
exit status 145: The directory is not empty. The error message " exit status 145: The directory is not empty. " , is not clear meaning for which directory is not empty , because the directory underline I running the command " nvm use 16.10.0 " , is a new directory and is empty .
'NVM use' giving an exit status: "exit status 145: The directory is not empty." #553 Closed 6 of 20 tasks therajaryanopened this issue Jun 28, 2020· 5 comments
Then try again nvm use XXXX (xxxx is the version) I meet same issue. I have resolved as: Make sure you delete all old nodejs. step 1:uninstall nodejs and remove node_home and npm_home; step 2: download nvm and Install it.
if it is a Windows machine go to C:\Program Files\nodejs. Then rename that folder to C:\Program Files\nodejsx. After that please check "nvm use v.v.v."
I just fixed it by uninstalling Node.js from the Settings -> Apps menu. According to the https://github.com/coreybutler/nvm-windows/pull/615 pull request, nvm cannot change the version because it's conflicting with the normally installed Node.js version. Try deleting Node.js from the Apps settings menu.
When this happen:
C:\Windows\System32>nvm use 16.13.0
exit status 145: The directory is not empty.
Just make sure, the nodejs folder is empty, check C:\Program Files\nodejs
or C:\Program Files (x86)\nodejs
, otherwise delete the content. Then try again nvm use XXXX
(xxxx is the version)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With