| Start |
|---|
| Install NVM You can use Or you can use |
| Check NVM version To verify that nvm has been installed, do: which should output 'nvm' if the installation was successful. |
| Installing an specific Node version Listing available remote versions for installation Installing a remote version For example |
| Using an already installed node version To list available local versions of node through NVM: For example, if You can switch to |
Install nvm on Mac OSX INSTALLATION PROCESSYou can install Node Version Manager using git, curl or wget. You run these commands in Terminal on Mac OSX. curl example: wget example: TEST THAT NVM WAS PROPERLY INSTALLEDTo test that nvm was properly installed, close and re-open Terminal and enter If you still get nvm: command not found, try the following:
export NVM_DIR=”/Users/johndoe/.nvm” [ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”
source ~/.nvm/nvm.sh
|
| Setting alias for node version If you want to set some alias name to installed node version, do: Similary to unalias, do: A proper usecase would be, if you want to set some other version than stable version as default alias. Like: Then every time console/terminal starts 5.0.1 would be present by default. Note: |
| Run any arbitrary command in a subshell with the desired version of node List all the node versions installed Run command using any node installed version To install node LTS version Version Switching RemarksThe urls used in the above examples reference a specific version of Node Version Manager. It is most likely that the latest version is different to what's being referenced. To install nvm using the latest version, click here (opens new window) to access nvm on GitHub, which will provide you with latest urls. |
Read Article
https://develop.horje.com/learn/1434/reference