Advertisement
efxtv

Install node using NVP

Sep 7th, 2022 (edited)
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. # Update node with NVM (Node Version Manager (nvm)
  2.  
  3. # Download the install script
  4. curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh -o install_nvm.sh
  5.  
  6. # Run the install script
  7. bash install_nvm.sh
  8.  
  9. # Configure
  10. export NVM_DIR="$HOME/.nvm"
  11. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
  12. [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  13.  
  14. # Restart your terminal
  15. command -v nvm
  16.  
  17. # Use nvm to install the latest LTS release of Node.js
  18. nvm install --lts
  19. nvm install node
  20.  
  21. # Switch to another version
  22. nvm use 10.16.3
  23. nvm use node
  24.  
  25.  
  26. Source
  27. https://heynode.com/tutorial/install-nodejs-locally-nvm/
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement