方式一:
npm cache clean --force npm config set registry https://registry.npmmirror.com npm install
下面是简单的解释:
🍀1、强制清理 npm 缓存
npm cache clean --force
🍀2、设置镜像源
npm config set registry https://registry.npmmirror.com
🍀3、重新 install
npm install
方式二:
npm config set registry https://registry.npm.taobao.org npm config get registry npm install