Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node&npm升级 #28

Open
Myoursky opened this issue Feb 2, 2018 · 0 comments
Open

node&npm升级 #28

Myoursky opened this issue Feb 2, 2018 · 0 comments

Comments

@Myoursky
Copy link
Owner

Myoursky commented Feb 2, 2018

一行命令搞定npm和node.js的升级,省去了重新编译和安装的过程。具体如下:

升级node.js

npm中有一个模块叫做“n”,专门用来管理node.js版本的。
更新到最新的稳定版只需要在命令行中打下如下代码:

npm install -g n
n stable

如需最新版本则用n latest

image

当然,n后面也可以跟具体的版本号:n v6.2.0

node.js升级就是这么简单。

升级npm

npm升级就更简单了,只需要在终端中输入:

npm -g install npm@next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant