install 超时

查看npm源地址

npm config get registry

#http://registry.npmjs.org 为国外镜像地址

设置阿里云镜像

npm config set registry http://registry.npm.taobao.org
npm install --registry=https://registry.npm.taobao.org

重新运行npm命令,解决

npm ERR! code ELIFECYCLE

node_modules的问题,重新安装

rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install  # 很慢
npm run build

另一种设置镜像的方法

npm install -g cnpm --registry=http://registry.npm.taobao.org 
cnpm -v 
cnpm install

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2021-04-18
  • 2022-01-03
猜你喜欢
  • 2022-12-23
  • 2021-07-15
  • 2021-06-19
  • 2021-07-18
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案