node -v
v10.16.0
npm -v
6.9.0
I followed the document . While running 'npm run build', the messages are
> [email protected] build /home/XXX/codimd
> webpack --config webpack.prod.js --progress --colors --bail
96% [0] chunk asset optimization TerserPlugin <--the process stuck here for a long time
npm ERR! code ELIFECYCLE
npm ERR! errno 137
npm ERR! [email protected] build: `webpack --config webpack.prod.js --progress --colors --bail`
npm ERR! Exit status 137
npm ERR!
npm ERR! Failed at the [email protected] 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! /XXX/.npm/_logs/YYYYYYY-debug.log
The log file is shown as following:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]~prebuild: [email protected]
6 info lifecycle [email protected]~build: [email protected]
7 verbose lifecycle [email protected]~build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~build: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/XXX/codimd/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~build: CWD: /home/XXX/codimd
10 silly lifecycle [email protected]~build: Args: [ '-c',
10 silly lifecycle 'webpack --config webpack.prod.js --progress --colors --bail' ]
11 silly lifecycle [email protected]~build: Returned: code: 137 signal: null
12 info lifecycle [email protected]~build: Failed to exec build script
13 verbose stack Error: [email protected] build: `webpack --config webpack.prod.js --progress --colors --bail`
13 verbose stack Exit status 137
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/XXX/codimd
16 verbose Linux 4.15.0-55-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 137
22 error [email protected] build: `webpack --config webpack.prod.js --progress --colors --bail`
22 error Exit status 137
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 137, true ]
The error is not shown anymore after I added memory up to 2GB to my server.
Hi pyrochlore
I got the same error now.
Where can I add memory up to my server?
Most helpful comment
The error is not shown anymore after I added memory up to 2GB to my server.