首页 > 解决方案 > Jenkins 构建 Angular 项目,构建停止在 ' npm run build '

问题描述

我需要由 Jenkins 部署一个 Angular 项目,但我没有成功。它在我的个人计算机上本地工作。在使用 Jenkins 时,它似乎停止在“node scripts/color-less.js”,这些是一些日志。

+ npm -v
6.4.1
+ node -v
v8.12.0


added 1717 packages from 1370 contributors and audited 45896 packages in 128.217s
found 16 vulnerabilities (10 low, 1 moderate, 5 high)
  run `npm audit fix` to fix them, or `npm audit` for details
+ npm run build

> demo@0.0.0 build /var/jenkins_home/workspace/ythmc-admin(test)
> npm run color-less && ng build --prod --build-optimizer


> demo@0.0.0 color-less /var/jenkins_home/workspace/ythmc-admin(test)
> node scripts/color-less.js

Killed
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! demo@0.0.0 build: `npm run color-less && ng build --prod --build-optimizer`
npm ERR! Exit status 137
npm ERR! 
npm ERR! Failed at the demo@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-12-25T02_13_42_873Z-debug.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE

标签: node.jsangularjenkins

解决方案


推荐阅读