1、安装nodejs

2、设置仓库。

仓库默认是https://registry.npmjs.org。如果公司内部有仓库,则需要设置为公司内部的仓库。

npm config set registry https://xxx.com/npm/

查看仓库设置

npm config list

3、如果安装了多个版本的node,那么怎么设置主版本呢?

使用nvm。

相关文章: