慕容的工作随笔

慕容的工作随笔

记录学习和工作

【转载】npm 源地址设置及恢复

转自:https://www.cnblogs.com/nuomibaibai/p/16470559.html npm 源地址设置及恢复

设置国内淘宝镜像 通过cnpm使用淘宝镜像: npm install -g cnpm --registry=https://registry.npm.taobao.org

将npm设置为淘宝镜像: npm config set registry https://registry.npm.taobao.org

查看当前npm源 npm config get registry

查看当前cnpm源 cnpm config get registry

如果设置了npm为淘宝镜像,需要恢复为默认源时: npm config set registry=https://registry.npmjs.org

设置之后,记得通过npm config get registry 查看源是否设置成功

评论 (0)

还没有评论,来做第一个吧。

发表评论

提交后需管理员审核通过后显示