vue3 npm run build 报错 Command failed with exit code 134和Command failed with exit code 1

问题描述:项目用的是JeecgBoot-Vue3,在开发环境npm run dev 一切都正常,但是npm run test 或npm run build就报Command failed with exit code 134,解决了code134,又报出Command failed with exit code 1 。

解决Command failed with exit code 134

  1. 安装两个npm包
npm install increase-memory-limit cross-env -g
  1. 在项目中的package.json里面的scripts里面添加脚本
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
Snipaste_2023-09-08_14-38-04.png

3.执行如下命令

npm run fix-memory-limit
  1. 重启项目
npm run build

解决Command failed with exit code 1

我这边是code134解决之后重启项目接着报code1,参考了这位博主的文章(https://blog.csdn.net/qq_33625611/article/details/115451821),问题解决。

打开git bash运行以下命令,将git更新到最新版本

git update-git-for-windows
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容