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 Overflownvm-windows install troubleshooting
Node Version Manager
Should i use nvm-windows
NVMe SSD disappearing after Windows 11 install
Videos
Complete amateur here, just starting out with node today. I am on W11 and have used WSL before for some computational stuff. However, I had not thought to use WSL for installing node until reading some posts on here. Currently working with nvm-windows (version 1.2.2) as a result.
Mods, if this is not the right place to post this, I apologize. Just wanted to write here in case someone has an issue similar to what I had when trying to run nvm-windows.
Most of you probably would have seen this instantly, and in hindsight, I should have caught this sooner...
But when choosing a custom path for installing NVM HOME, etc. don't forget to add the backslash () at the end of your file path. I was unable to run the "nvm" command in powershell because of this mistake. Lol. For some reason, when I checked the file path, it didn't have the final backslash by default.
Hello gang, I am having issues using Node version manager on windows. I have checked my environmental variables, manually added paths via my bash file, and i used the powershell, command prompt, and git bash. NVM commands work fine but node -v and npm -v will not work at all. Incredibly frustrating as i was in the middle of working on AWS services so this is incredibly counter productive. Any advice?
I should add that i was using the latest version of node up until today without any issues. An application or project i was working on necessitated an older version of Node.js. The Windows support article https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows explains in few details additional processes i could take to resolve the issue so i have been relying on information found on the web. I can send photos of my environmental variables although i am very cautious uploading any information regarding my local machine via a subreddit about programmers learning. Unfortunately not all humans live for the betterment of the human race. If anyone has dealt with this problem. let me know a resource i can delve into or how you resolved the issue.
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