跳到主要內容

How to Upgrade (or Downgrade) Node.js using NPM

https://www.abeautifulsite.net/how-to-upgrade-or-downgrade-nodejs-using-npm

Upgrading to the latest stable version

This will update you to the latest available stable version:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Upgrading to the latest LTS version

Node also offers a long-term support (LTS) version. If you need that version (or any other), simply specify the version number you want:
sudo npm cache clean -f
sudo npm install -g n
sudo n 4.4.2

Checking your Node version

To see which version of Node is currently installed, simply run:
node -v

留言

這個網誌中的熱門文章

Benefits of logging progress

Logging your experience has important benefits: Working through the steps will keep you from getting stalled. As a cohort you will build up a useful body of information that others can learn from. You will have a chance to find other students working on similar challenges, allowing you to collaborate.