Node Version Manager (NVM) on Windows

2020-05-19 04:24发布

I am trying to downgrade my version of node

I ran:

npm install nvm

and I exported the bin folder to my Windows path variable,

C:\Program Files (x86)\nodejs\node_modules\npm\bin

but I still get:

'nvm' is not recognized as a an internal or external command.

Should I be adding another path to my path variable?

标签: node.js npm nvm
8条回答
成全新的幸福
2楼-- · 2020-05-19 05:02

As an node manager alternative you can use Volta from LinkedIn.

查看更多
3楼-- · 2020-05-19 05:02

The first thing that we need to do is install NVM. website : https://docs.microsoft.com/en-us/windows/nodejs/setup-on-windows

查看更多
小情绪 Triste *
4楼-- · 2020-05-19 05:11

The first thing that we need to do is install NVM.

  1. Uninstall existing version of node since we won’t be using it anymore
  2. Delete any existing nodejs installation directories. e.g. “C:\Program Files\nodejs”) that might remain. NVM’s generated symlink will not overwrite an existing (even empty) installation directory.
  3. Delete the npm install directory at C:\Users[Your User]\AppData\Roaming\npm We are now ready to install nvm. Download the installer from https://github.com/coreybutler/nvm/releases

To upgrade, run the new installer. It will safely overwrite the files it needs to update without touching your node.js installations. Make sure you use the same installation and symlink folder. If you originally installed to the default locations, you just need to click “next” on each window until it finishes.

Credits Directly copied from : https://digitaldrummerj.me/windows-running-multiple-versions-of-node/

查看更多
神经病院院长
5楼-- · 2020-05-19 05:18

NVM Installation & usage on Windows

Below are the steps for NVM Installation on Windows:

NVM stands for node version manager, which will help to switch between node versions while also allowing to work with multiple npm versions.

  • Install nvm setup.
  • Use command nvm list to check list of installed node versions.
  • Example: Type nvm use 6.9.3 to switch versions.

For more info

查看更多
Juvenile、少年°
6楼-- · 2020-05-19 05:18

First off, I use nvm on linux machine.

When looking at the documentation for nvm at https://www.npmjs.org/package/nvm, it recommendations that you install nvm globally using the -g switch.

npm install -g nvm

Also there is a . in the path variable that they recommend.

export PATH=./node_modules/.bin:$PATH

so maybe your path should be

C:\Program Files (x86)\nodejs\node_modules\npm\\.bin
查看更多
看我几分像从前
7楼-- · 2020-05-19 05:23

nvm was designed for Linux. nvmw, which is completely different broke around node v0.10.30. Try NVM for Windows.

查看更多
登录 后发表回答