1.安装项目的时候出现bug
报错:npm ERR! Unexpected end of JSON input while parsing near '…44,"noat…
一般造成这样的原因是,由于缓存导致的。
解决办法:npm cache clean --force
2.使用npm安装一些包失败了,多半由于网速的问题。
镜像使用方法:
1.通过config命令
npm config set registry https://registry.npm.taobao.org //安装配置淘宝镜像
npm install
检查:
npm config get registry