How To Upgrade Node.js To The Latest Version?

If you initially installed Node.js with Homebrew, run:
 brew update
 brew upgrade node
 npm update -g npm

Other Alternatives:
A convenient way to change versions is to use nvm:
 brew install nvm
To install the latest version of Node.js with nvm:
 nvm install node
Upgrading via NPM
You can use the simpler method via the terminal. Avoid using sudo unless you need to.
 sudo npm cache clean -f
 sudo npm install -g n
Then
 sudo n stable 
Or
 sudo n latest
After which you may opt to confirm the upgrade
 node -v

Comments

  1. Learn power bi training from india's leading software training institute: Onlineitguru and get your dream job in your dream company. We provide Live Instructor-Led Online Classes with 100% job Assistance and 24 X 7 Online Support.
    power bi training | power bi online course
    Contact Information:
    USA: +1 7327039066
    INDIA: +91 8885448788 , 9550102466
    Email: info@onlineitguru.com

    ReplyDelete

Post a Comment

Popular Posts