Node.js Version Support
When maintaining Angular apps and other Javascript-based libraries, you will come across the need to have a specific version of Node.js running on your development host.
Node Version Manager, is a Windows based package, that will swap in desired versions of Node.js as needed.
Download and install the latest version of nvm for Windows.
Setup
Once installed, you need to tell NVM to install the desired Node.js versions that it will manage for you:
nvm install 16
nvm install 20
Usage
With the desired versions of Node.js installed, you can use these commands to switch between them:
To run Node.js v16 (for Angular v14):
nvm use 16.20.2
To run Node.js v20 (for Angular v17):
nvm use 20.18.3
NOTE: Each time you tell NVM to switch versions, it may require answering a UAC popup.
And once NVM has switched in the desired Node.js version, you can call this, to verify:
node -v