Home
Support Forums

I get an error when deploying

I need advice to debug deploy…

12:24:31 AM: > npm run build
12:24:39 AM: ​
12:24:39 AM: ────────────────────────────────────────────────────────────────
12:24:39 AM:   "build.command" failed                                        
12:24:39 AM: ────────────────────────────────────────────────────────────────
12:24:39 AM: ​
12:24:39 AM:   Error message
12:24:39 AM:   Command was killed with SIGKILL (Forced termination): npm run build
12:24:39 AM: ​
12:24:39 AM:   Error location
12:24:39 AM:   In Build command from Netlify app:
12:24:39 AM:   npm run build
12:24:39 AM: ​
12:24:39 AM:   Resolved config
12:24:39 AM:   build:
12:24:39 AM:     command: npm run build
12:24:39 AM:     commandOrigin: ui
12:24:39 AM:     publish: /opt/build/repo/public
12:24:39 AM:     publishOrigin: ui
12:24:40 AM: > user@0.1.0 build /opt/build/repo
12:24:40 AM: > npm run build
12:24:40 AM: Caching artifacts
12:24:40 AM: Started saving node modules
12:24:40 AM: Finished saving node modules
12:24:40 AM: Started saving build plugins
12:24:40 AM: Finished saving build plugins
12:24:40 AM: Started saving pip cache
12:24:40 AM: > user@0.1.0 build /opt/build/repo
12:24:40 AM: > npm run build
12:24:40 AM: Finished saving pip cache
12:24:40 AM: Started saving emacs cask dependencies
12:24:40 AM: Finished saving emacs cask dependencies
12:24:40 AM: Started saving maven dependencies
12:24:40 AM: Finished saving maven dependencies
12:24:40 AM: Started saving boot dependencies
12:24:40 AM: Finished saving boot dependencies
12:24:40 AM: Started saving rust rustup cache
12:24:40 AM: Finished saving rust rustup cache
12:24:40 AM: Started saving go dependencies
12:24:40 AM: Finished saving go dependencies
12:24:41 AM: > user@0.1.0 build /opt/build/repo
12:24:41 AM: > npm run build
12:24:41 AM: > user@0.1.0 build /opt/build/repo
12:24:41 AM: > npm run build
12:24:51 AM: Killed
12:24:51 AM: npm ERR! code ELIFECYCLE
12:24:51 AM: npm ERR! errno 137
12:24:51 AM: npm ERR! user@0.1.0 build: `npm run build`
12:24:51 AM: npm ERR! Exit status 137
12:24:51 AM: npm ERR!
12:24:51 AM: npm ERR! Failed at the user@0.1.0 build script.
12:24:51 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
12:24:51 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
12:24:51 AM: npm ERR! A complete log of this run can be found in:
12:24:51 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-07-21T15_24_51_039Z-debug.log
12:24:51 AM: npm ERR! code ELIFECYCLE
12:24:51 AM: npm ERR! errno 137
12:24:51 AM: npm ERR! user@0.1.0 build: `npm run build`
12:24:51 AM: npm ERR! Exit status 137
12:24:51 AM: npm ERR!
12:24:51 AM: npm ERR! Failed at the user@0.1.0 build script.
12:24:51 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
12:24:51 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
12:24:51 AM: npm ERR! A complete log of this run can be found in:
12:24:51 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-07-21T15_24_51_058Z-debug.log
12:24:51 AM: npm ERR! code ELIFECYCLE
12:24:51 AM: npm ERR! errno 137
12:24:51 AM: npm ERR! user@0.1.0 build: `npm run build`
12:24:51 AM: npm ERR! Exit status 137
12:24:51 AM: npm ERR!
12:24:51 AM: npm ERR! Failed at the user@0.1.0 build script.
12:24:51 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
12:24:51 AM: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
12:24:51 AM: npm ERR! A complete log of this run can be found in:
12:24:51 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-07-21T15_24_51_075Z-debug.log
12:24:51 AM: npm ERR! code ELIFECYCLE
12:24:51 AM: npm ERR! errno 137
12:24:51 AM: npm ERR! user@0.1.0 build: `npm run build`
12:24:51 AM: npm ERR! Exit status 137

package.json

    "scripts": {
        "post": "node ./cli/create-new-post.js",
        "dev": "gatsby develop",
        "lint": "eslint --ext .js,.jsx --ignore-pattern public .",
        "format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.js' 'src/**/*.md'",
        "develop": "gatsby develop",
        "start": "npm run develop",
        "build": "npm run build",
        "lh": "lighthousebot",
        "fix-semi": "eslint --quiet --ignore-pattern node_modules --ignore-pattern public --parser babel-eslint --no-eslintrc --rule '{\"semi\": [2, \"never\"], \"no-extra-semi\": [2]}' --fix gatsby-node.js"
    }

Site deployment is not possible. Help. :pray:t2:
Thanx. 🥲

Hi @chacha,

Your build was killed because it ran out of memory. You might want to try to optimise the resource usage or manually deploy via CLI.