npm 操作

npm install 下载很慢的时候可以使用:

使用淘宝镜像:
npm install -g --registry=https://registry.npm.taobao.org

npm出现了很多的bug:

script dev 的问题:
https://segmentfault.com/q/1010000015098798

项目npm install时报错phantomjs-prebuilt@2.1.16安装失败

执行npm install phantomjs-prebuilt@2.1.16 --ignore-scripts命令用来安装phantomjs-prebuilt@2.1.16,–ignore-scripts参数用于npm install在安装phantomjs-prebuilt@2.1.16时忽略package.json中设置的脚本,意思就是避免package.json中的脚本影响包的正常安装。

 
原文地址:https://www.cnblogs.com/pro-wall-box/p/13288617.html