Actually you are trying to perform command of ubuntu/mac on windows.
If you want to install NVM in windows then please refer this step by step guide.
Step by step guide
NVM For Windows
Answer from Dakshesh Baldaniya on Stack OverflowHow to install nvm for windows 10 and set up for all users - Stack Overflow
Should i use nvm-windows
Do you use nvm?
How to install Node Version Manager (NVM) for Windows 10?
I think you are mixing up node and npm a lot.
nvm use <version> uses <version> of node, not npm for example.
Also if somebody doesn't know how to extract and install a zipped windows setup, maybe its too soon to use nvm or node on Windows?
More on reddit.comVideos
Used the registry editor to add 2 new string varaibles to the regular user's profile. Can't do it through the Control Panel GUI because I'm always forced to use elevated credentials to access the control panel. And then when I do edit the User's environment vars, it's for the admin account only. So now when I open up a command window and run the "set" command, it includes these two variables:
NVM_HOME=C:\Users\<nonAdminUser>\AppData\Roaming\nvm
NVM_SYMLINK=C:\Program Files\nodejs
And now everything just works.
In my case it works without registry editing:
- Switch to admin account
- Go to nvm folder and add share it with user.
- Switch to user account.
- Add %NVM_HOME% and %NVM_SYMLINK% to user PATH variable
- Restart cmd.
I only recently started using nodejs. I installed it with an installer which i probably shouldn’t do and use version manager instead. Idk yet if i will work on different versions until the point i will do fresh windows install (in 2 months). If i don’t really need to switch node versions (idk yet) can i stay with my current installation? Which version manager should i use (nvm-windows seems to be recommended)? Is just running uninstaller enough to clean thing up enough for version manager or should i do manual cleanup or 3rdparty uninstaller(like revo), and if needed what folders should i delete. Also should i use LTS or latest in most cases(assuming i don’t really need newer features).
OS: windows 10 and i will move to windows 11 in few months