Can not build instance
Expect build success
build with error
ubuntu 18.04
error log:
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/misskey/misskey/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin
9 verbose lifecycle [email protected]~build: CWD: /home/misskey/misskey
10 silly lifecycle [email protected]~build: Args: [ '-c', 'webpack && gulp build' ]
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 && gulp build`
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:193: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:193:13)
13 verbose stack at maybeClose (internal/child_process.js:999:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/misskey/misskey
16 verbose Linux 4.15.0-1032-aws
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v11.15.0
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 137
22 error [email protected] build: `webpack && gulp build`
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 ]
It seems the builder was killed by Linux OOM Killer. Please increase RAM size or swapfile size.
I already have 1G ram and 2G swap, do I need more? Thanks
Yes, you should increase the swapfile size at least 2GB. On my VPS, The build was failed when the swapfile size is 2GB and fixed it when the swapfile size is increased to 4GB.
@syuilo I think this information should be documented to the installation guide.
Yes that solves the build problem! Thx a lot!