更新时间:2024-05-10 GMT+08:00
npm构建耗时且安装依赖缓慢
原因分析
默认的镜像仓地址因网络原因可能导致网络下行效率低。
处理方法
- 进入编译构建服务首页。
- 选择对应的构建任务,单击任务所在行的,单击“编辑”。
- 在“构建步骤”页面编辑“NPM构建”。
- 在NPM构建步骤里,添加如下命令,修改Npm镜像仓地址:
1
npm config set registry https://repo.xxcloud.com/repository/npm/
或
npm config set registry https://registry.npm.taobao.org
- 单击“保存并执行”,重新执行构建任务。
父主题: Npm构建
Npm构建 所有常见问题
- JavaScript heap out of memory
- Unexpected end of JSON ...
- enoent ENOENT: no such file or directory
- Module not found: Error: Can't resolve ...
- NPM构建失败,但不显示错误日志
- npm cb() never called
- gyp ERR! stack Error: EACCES: permission denied
- eslint: error 'CLODOP' is not defined
- node-sass下载失败
- error: could not write config file
- npm构建耗时且安装依赖缓慢
- 找不到依赖版本
more