• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

jwang106


脚踏实地,日拱一卒。 建立新的神经链接,可不像公园散步那样简单。
  • 博客园
  • 联系
  • 管理

View Post

npm install 超时 国内 切换源; npm ERR! code ELIFECYCLE;

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

posted on 2019-07-27 16:34  jwang106  阅读(1645)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3