8000 Docker build failed with npm install Killed returned a non-zero code 137 · Issue #121 · Matterwiki/Matterwiki · GitHub
[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failed with npm install Killed returned a non-zero code 137 #121

Open
ADTC opened this issue Oct 25, 2017 · 3 comments
Open

Comments

@ADTC
Copy link
ADTC commented Oct 25, 2017

I'm using master branch and I tried to use Docker. But the build step is failing with this error:

Killed
The command '/bin/sh -c npm install' returned a non-zero code: 137

Edit: I have tried the refactor branch as well, but 8000 same problem there. (It also looks like npm is killed randomly.)

I read that it runs out of memory, though I'm not sure. Any resolution?

More tails of the log:

npm info attempt registry request try #1 at 8:28:50 AM
npm http fetch GET https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-3.0.0-beta.6.tgz
npm http fetch 200 https://registry.npmjs.org/babel-loader/-/babel-loader-6.2.10.tgz
npm http fetch 200 https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.22.0.tgz
npm http fetch 200 https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-3.0.0-beta.6.tgz
npm http fetch 200 https://registry.npmjs.org/babel-cli/-/babel-cli-6.22.2.tgz
npm http 200 https://registry.npmjs.org/babel-core
npm info retry fetch attempt 1 at 8:28:52 AM
npm info attempt registry request try #1 at 8:28:52 AM
npm http fetch GET https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.2.0.tgz
npm http fetch 200 https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.2.0.tgz
npm info retry fetch attempt 1 at 8:28:58 AM
npm info attempt registry request try #1 at 8:28:58 AM
npm http fetch GET https://registry.npmjs.org/testcafe/-/testcafe-0.13.0.tgz
npm http fetch 200 https://registry.npmjs.org/testcafe/-/testcafe-0.13.0.tgz
npm info retry fetch attempt 1 at 8:29:07 AM
npm info attempt registry request try #1 at 8:29:07 AM
npm http fetch GET https://registry.npmjs.org/babel-core/-/babel-core-6.22.1.tgz
npm http fetch 200 https://registry.npmjs.org/babel-core/-/babel-core-6.22.1.tgz
npm http 200 https://registry.npmjs.org/webpack
Killed
The command '/bin/sh -c npm install' returned a non-zero code: 137
npm http request GET https://registry.npmjs.org/webpack-hot-middleware
npm http 200 https://registry.npmjs.org/clean-webpack-plugin
npm http 200 https://registry.npmjs.org/eslint-plugin-prettier
npm http 200 https://registry.npmjs.org/babel-preset-react
npm http 200 https://registry.npmjs.org/babel-plugin-transform-object-rest-spread
npm http 200 https://registry.npmjs.org/eslint-config-prettier
npm http 200 https://registry.npmjs.org/babel-plugin-transform-class-properties
npm http 200 https://registry.npmjs.org/file-loader
npm http 200 https://registry.npmjs.org/cross-env
npm http 200 https://registry.npmjs.org/eslint-config-airbnb
npm http 200 https://registry.npmjs.org/babel-loader
npm http 200 https://registry.npmjs.org/url-loader
npm http 200 https://registry.npmjs.org/css-loader
npm http 200 https://registry.npmjs.org/husky
npm http 200 https://registry.npmjs.org/babel-cli
npm http 200 https://registry.npmjs.org/style-loader
npm http 200 https://registry.npmjs.org/html-webpack-plugin
npm http 200 https://registry.npmjs.org/webpack-hot-middleware
npm http 200 https://registry.npmjs.org/webpack-dev-middleware
npm http 200 https://registry.npmjs.org/babel-eslint
npm http 200 https://registry.npmjs.org/eslint-plugin-jsx-a11y
npm http 200 https://registry.npmjs.org/jest
npm http 200 https://registry.npmjs.org/knex-db-manager
npm http 200 https://registry.npmjs.org/eslint-plugin-import
npm http 200 https://registry.npmjs.org/eslint-plugin-react
Killed
The command '/bin/sh -c npm install' returned a non-zero code: 137
@ADTC
Copy link
Author
ADTC commented Oct 25, 2017

Update: I removed Docker and decided to install npm and run Matterwiki in the traditional way. But again, I hit the same error with npm install. This is when I was sure it is definitely an issue with memory.

You can temporarily add swap storage to your Ubuntu installation to work around the problem. DigitalOcean has a nice guide on this, which would work on any Ubuntu installation. If your server is using SSD, you may want to remove the swap file with swapoff (and rm) when you're done, as long-term swap usage on SSD is not recommended.

Your mileage may vary.

@ADTC
Copy link
Author
ADTC commented Oct 25, 2017

Isn't there any way to run this without npm or Docker? My mileage has suffered. I find Node to be really heavy - can't run on tiny systems.

@ADTC
Copy link
Author
ADTC commented Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0