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 in windows - Stack Overflow
How to install nvm for windows 10 and set up for all users - Stack Overflow
You can manage multiple Node versions with nvm
Ive installed nodejs via nvm-windows but it didnt install npm?
Videos
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.
If you're working on multiple projects, some might have different node version requirements. This happens a lot for Open Source contributors! Let's see how to quickly switch between them with a tool called nvm and leverage the .nvmrc file to make it 100% seamless!
It's available on all OS, including Windows, Linux, and MacOS.
Do not get confused though, Windows has its own version, slightly different from the one for Unix systems:
Windows: https://github.com/coreybutler/nvm-windows
Linux/MacOS: https://github.com/nvm-sh/nvm
In short, they both use nvm as a terminal command, so for basic usage you won't find many differences. For advanced users though, you may notice something. Make sure to read the docs in the README.md file of each repository.
I explain everything in a video, if you're interested you can watch it here: https://youtu.be/A-pbv5eKCDc
Enjoy nvm!
Hi there, ive used this
https://github.com/coreybutler/nvm-windows/releases
and just typed
nvm install --lts
then ill type
npm -v
and it tells me it couldnt find that command.
Am I doing something wrong?
EDIT:
fixed it with nvm on