npm 安装项目问题小记

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
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013746071/article/details/88388907
今日推荐