nvm

nvm
1
is a version manager for
Node.js️
2
.


Dependencies

Required


1. Install

NOTE

Use nvm to install latest node version.


2. Configure

2.1. Convenience script

NOTE

init-nvm.sh is a convenience script that does the following:

  1. [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
  2. source /usr/share/nvm/nvm.sh
  3. source /usr/share/nvm/bash_completion
  4. source /usr/share/nvm/install-nvm-exec

2.2. Install node and npm

NOTE

  • --lts installs node lts/* and latest
    npm
    3
    versions
  • See
    Long-term Support
    4

2.3. Auto nvm-use

NOTE

If .nvmrc exists after cd, switch to specified version, otherwise, use default.


References

Show Comments