NPM Start/Build/Install Fail at 91%
I ran into this error on ECS that busted my productivity for 4 days.
Returned: code: 137 signal: null
npm info lifecycle package thing@1.0.0~build: Failed to exec build script
npm verb stack Error: package thing@1.0.0 build: `NODE_ENV=production webpack — hide-modules — progress`
npm verb stack Exit status 137
npm verb stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
npm verb stack at emitTwo (events.js:126:13)
npm verb stack at EventEmitter.emit (events.js:214:7)
npm verb stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at emitTwo (events.js:126:13)
npm verb stack at ChildProcess.emit (events.js:214:7)
npm verb stack at maybeClose (internal/child_process.js:925:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npm verb pkgid Package thing@1.0.0
npm verb cwd /usr/local/apache2/htdocs
npm verb Linux 4.14.33–51.37.amzn1.x86_64
npm verb argv “/usr/bin/node” “/usr/bin/npm” “run-script” “build” “-loglevel” “silly”
npm verb node v8.9.1
npm verb npm v5.5.1
npm ERR! code ELIFECYCLE
And no matter what I did… I got this sort of failure around a step that looked like this.
91% additional asset processing . Killed
So I found some random github error on a package that vaguely alluded to the memory being an issue in building. Which I dismissed as stupid but decided to try because maybe…. In my ECS config that it was failing in I went from the defaults to uping the memory and vCPU to numbers that are would be way more than needed.
First try — the package built, ran, installed. Any step worked fine. Suprise.
Now I need to find a reasonable amount of memory and CPU for this thing. If any one has a good idea on that let me know.