theLei_ 2021-12-28 18:37 采纳率: 0%
浏览 404

Jenkins打包部署Vue项目到服务器上失败

在部署项目到服务器上通过Jenkins实现,但是在执行打包命令的时候失败了,命令行提示了一下信息:

C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\DMIS>cd C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\Jenkins\\.jenkins\\workspace\\DMIS   && yarn   & yarn build 
yarn install v1.22.17
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > sass-loader@8.0.2" has unmet peer dependency "webpack@^4.36.0 || ^5.0.0".
[4/4] Building fresh packages...
Done in 33.08s.
yarn run v1.22.17
$ vue-cli-service build

-  Building for production...
C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\DMIS\node_modules\neo-async\async.js:16
    throw new Error('Callback was already called.');
    ^

Error: Callback was already called.
    at throwError (C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\DMIS\node_modules\neo-async\async.js:16:11)
    at C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\DMIS\node_modules\neo-async\async.js:2818:7
    at processTicksAndRejections (internal/process/task_queues.js:77:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

查找了相关解决方案都没有解决,但是自己在服务器项目文件上通过cmd命令行操作打包命令时,可以正常打包文件。不知道是什么原因导致Jenkins执行该命令失败。

  • 写回答

1条回答 默认 最新

  • IT民工金鱼哥 运维领域新星创作者 2021-12-28 20:57
    关注

    一般打包遇到问题时,先去项目组的workspace,进行命令手工打包,看看是否OK,如果有错误,需要排错各种~还有,jenkins的打包设置要设置正确。

    评论

报告相同问题?

问题事件

  • 创建了问题 12月28日

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记