npm更换镜像

更换为淘宝镜像

npm config set registry https://registry.npm.taobao.org

  • 查看更换镜像

npm config get registry

切换会原来的镜像

npm config set registry https://registry.npmjs.org

安装 cnpm

npm install -g cnpm —registry=https://registry.npm.taobao.org

使用cnpm 安装module

cnpm install xxxx -g

webpack执行失败 无法加载文件webpack.ps1

管理员模式运行powershell

set-ExecutionPolicy RemoteSigned

原文链接: npm更换镜像 版权所有,转载时请注明出处,违者必究。
注明出处格式:流沙团 ( https://www.gyarmy.com/post-795.html )

发表评论

0则评论给“npm更换镜像”