Avoid hard labor dealing with node version of different projects.
Use NVM to manage different node versions.NVM allows to install different versions depending on the project you working on via CLI.
1: In the nvm-windows repository Readme, click on "Download Now!":
2: Download and Install .exe file of the latest release.
3: check nvm version.
4: The installation process from above should automatically add the nvm configuration to your profile. If you're using zsh, that would be ~/.zshrc
. If you're using bash, that would be ~/.bash_profile
...or some other profile.
If it doesn't automatically add nvm configuration, you can add it yourself to your profile file:
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s"${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
5: Reload the shell configuration source ~/.bashrc
6: check nvm version: nvm -v
Note:
1: Can use nvm to install and use node versions below commands.
nvm install latest - // install latest version
nvm install vX.Y.Z - // install specific version
nvm alias default vX.Y.Z - // set default version
nvm use vA.B.C - // use a specific version
Top comments (0)