-
After using Xshell to connect to a Linux server, first enter node- V View the version currently in use
- if the version viewed above is low, you can start the upgrade
Clear npm cache clean--force
- also need to install n modules before upgrading, N module is dedicated to manage Nodejs version
Input NPM install-g n
- n module after the installation is complete, enter n-v view version, display, then the Success button. N after the module installation is complete without configuring environment variables and soft connections, you need to take the full path to execute
- If you want to upgrade to a specific version, you can use n 7.1.0 to upgrade
- After the upgrade is complete, enter node-v again to see if the current version has been successfully upgraded to the new version
- can also be entered directly n stable , upgrade to the latest stable version of Nodejs
Nodejs How to upgrade to the latest version n stable