当前位置: 首页 > 知识库问答 >
问题:

vue-cli - 今天上午打包是正常,下午打包时报这样的错误是什么原因?

戚京
2024-03-11

Error: Build failed with errors.
Error: Build failed with errors.

at E:\workspace\cmweb\CMDraw\konvaproject\node_modules\@vue\cli-service\lib\commands\build\index.js:207:23at E:\workspace\cmweb\CMDraw\konvaproject\node_modules\webpack\lib\webpack.js:148:8at E:\workspace\cmweb\CMDraw\konvaproject\node_modules\webpack\lib\HookWebpackError.js:68:3at Hook.eval [as callAsync] (eval at create (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)       at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\tapable\lib\Hook.js:18:14)at Cache.shutdown (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\webpack\lib\Cache.js:150:23)at E:\workspace\cmweb\CMDraw\konvaproject\node_modules\webpack\lib\Compiler.js:1225:15at Hook.eval [as callAsync] (eval at create (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)       at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\tapable\lib\Hook.js:18:14)at Compiler.close (E:\workspace\cmweb\CMDraw\konvaproject\node_modules\webpack\lib\Compiler.js:1218:23)
  • 终端进程“C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build:development.Hisense”已终止,退出代码: 1。
  • 终端将被任务重用,按任意键关闭。

共有2个答案

乐宜民
2024-03-11

是不是内存不够了,修改下增加下运行内存限制。

"scripts": {  "build": "NODE_OPTIONS=--max-old-space-size=4096 vue-cli-service build"}
何涵忍
2024-03-11

是我的.scss文件里不能写这种注释,如: // 菜单,可以写/*菜单/

 类似资料: