我正在尝试使用Ionic Dashboard中的 ionic deploy 构建和分发我的应用程序。由于我的应用程序的性质,我正在使用自定义构建脚本:
"scripts": {
"build": "npm install -g ionic && npm install -g cordova && npx gulp svgSprite && npm install angular-idle-preload --save && node --max_old_space_size=8192 node_modules/.bin/ng build --prod --verbose"
}
一切正常,直到大约 90% 标记,我得到以下错误:
89% record hash 0ms record hash
90% module assets processing84ms module assets processing
90% chunk assets processingKilled
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! app@0.0.0 build: `npm install -g ionic &&
npm install -g cordova && npx gulp svgSprite && npm install angular-idle-preload --save && node --max_old_space_size=8192 node_modules/.bin/ng build --prod --verbose`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the app@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/2019-03-21T18_17_39_693Z-debug.log
奇怪的是,当我删除它的--prod
标志时,它构建得很好。为什么我会收到此错误?是内存问题吗?