Today, we found a super-simple way to upgrade node. js. A single line of command is done, eliminating the process of recompiling the installation.
Node has a module called N (the name is short enough ...) ), which is specifically designed to manage the version of node. js.
Install the N module first:
?
Step Two:
Upgrade node. js to the latest stable version
?
Isn't it simple?!
You can also follow the version number after n, for example:
?
Or
?
It's so simple, what can I do?!!
Also share several common commands from NPM
?
1234567891011121314151617 |
npm-v #显示版本, Check that NPM is installed correctly. npm install express #安装express模块 npm install-g express #全局安装express模块 npm list #列出已安装模块 NPM show express #显示模块详情 NPM update # Upgrade all modules of the project under the current directory NPM update express #升级当前目录下的项目的指定模块 npm update-g express #升级全局安装的express模块 NPM Uninstall express #删除指定的模 |
One-line command for node. JS Version Upgrade