The old versions are maintained on your machine, and can be switched to easily by entering nvm use 8.11.1, which will switch you back to that specific past version. If a newer version (let's say 8.12.0) is release, you can simply type nvm install 8.12.0 (or whatever the version number is) and you'll be updated to a newer version of node. NVM makes updating your node version very easy. You're done! Enjoy JavaScript from the command line :) Updating to new versions of node Once that completes, you should be able to type node -version and npm -version and have version numbers pop up. # site in the "Recommended For Most Users" green box. In your terminal, enter: nvm install -lts Use NVM to install Node.js and the Node Package Manager (NPM) Run source ~/.bash_profile to re-run all the commands in that file, and now you should be able to run nvm -version and see a version number pop up. If you used Vi to add this, you can save and quit the file easily by hitting the "escape" key to exit out of insert mode, then hold "shift" and press "Z" twice to save and quit. bash_profile file: export NVM_DIR="$HOME/.nvm" bash_profile inside your home directory:Īdd the 2 lines to the bottom of the. Use a text editor (Vi or Nano would work well) to open (or create, if it doesn't exist yet) a file called.
0 Comments
Leave a Reply. |