nvm-windows
Manage multiple installations of node.js on a Windows computer.
Source: github.com: Node Version Manager (nvm) for Windows
nvm-windows Installation
It is always recommended to remove any existing installations of Node.js or npm from your operating system before installing a version manager as the different types of installation can lead to strange and confusing conflicts. This includes deleting 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. For help with removing previous installations, see stackoverflow.com: How to completely remove node.js from Windows.
Download from github.com: nvm (Windows) releases one of the latest installers (for example,
nvm-setup.zip), unzip it and runnvm-setup.exefile with default settings.Open
PowerShelland check thenpmversion:npm --version
6.14.11Install the current release of
node.js(for testing the newest feature improvements, but more likely to have issues than the LTS version):nvm install latestAnd install the latest stable LTS release of
node.js(recommended) by first looking up what the current LTS version number is with:nvm list availabletipAlso you can see all available
nodeversions at nodejs.orgthen installing the LTS version number with:
nvm install <version>replacing
<version>with the number, ie:nvm install 12.14.0.List what versions of
nodeare installed:nvm lsnow you should see the two versions that you just installed listed.
noteAt the moment (2020-03-20), I have installed node.js version
10.xdue to compatibility issues and version12.xdue to Docusaurus requirement.After installing the
node.jsversion numbers you need, select the version that you would like to use by entering:nvm use <version>replacing
<version>with the number, ie:nvm use 12.9.0.To change the version of
node.jsyou would like to use for a project, create a new project directory:mkdir NodeTest # Create the directory
cd NodeTest # and enter the directory
nvm use <version> # then enter node versionreplacing
<version>with the version number you'd like to use (ie:v10.16.3).Verify which version of
npmis installed with:npm --versionthis version number will automatically change to whichever
npmversion is associated with your current version ofnode.js.
Upgrading nvm-windows
To upgrade nvm-windows, 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.
.nvmrc error Windows
If:
❯ nvm use
.0.0
node v.0.0 (64-bit) is not installed.
First, run:
nvm on
Then:
type .\.nvmrc | %{$_ -replace "v",""} | %{nvm install $_}
type .\.nvmrc | %{$_ -replace "v",""} | %{nvm use $_}
Other nvm commands:
nvm current
source: github.com: nvm use with nvmrc as node node v.0.0 (64-bit) is not installed.