Hi - out of nowhere my builds have now started failing. The error message also doesn’t describe much besides the fact that the command exited with error.
Any help on how to debug this would be appreciated. Right now I don’t think I am even able to find a starting point.
@AnuragRamdasan Are you able to show the full build log?
You can also try searching the forum for code 137 and see what caused it for others, and how they resolved it.
here’s the entire error log
9:12:26 PM: Killed
9:12:26 PM: error Command failed with exit code 137. (Search results for '"non-zero exit code: 137"' - Netlify Support Forums )
9:12:26 PM: info Visit yarn run | Yarn for documentation about this command.
9:12:27 PM:
9:12:27 PM: “build.command” failed
9:12:27 PM: ────────────────────────────────────────────────────────────────
9:12:27 PM:
9:12:27 PM: Error message
9:12:27 PM: Command failed with exit code 137: yarn build (Search results for '"non-zero exit code: 137"' - Netlify Support Forums )
9:12:27 PM:
9:12:27 PM: Error location
9:12:27 PM: In Build command from Netlify app:
9:12:27 PM: yarn build
9:12:27 PM:
9:12:27 PM: Resolved config
9:12:27 PM: build:
9:12:27 PM: command: yarn build
9:12:27 PM: commandOrigin: ui
9:12:27 PM: environment:
9:12:27 PM: - NETLIFY_GRAPH_TOKEN
9:12:27 PM: - NODE_VERSION
9:12:27 PM: - NPM_VERSION
9:12:27 PM: - ONEGRAPH_AUTHLIFY_TOKEN
9:12:27 PM: - NEXT_PRIVATE_TARGET
9:12:27 PM: publish: /opt/build/repo/.next
9:12:27 PM: publishOrigin: ui
9:12:27 PM: plugins:
9:12:27 PM: - inputs: {}
9:12:27 PM: origin: ui
9:12:27 PM: package: ‘@netlify /plugin-nextjs’
9:12:27 PM: - inputs: {}
9:12:27 PM: origin: ui
9:12:27 PM: package: ‘@netlify /plugin-lighthouse’
9:12:28 PM: Caching artifacts
9:12:28 PM: Started saving node modules
9:12:28 PM: Finished saving node modules
9:12:28 PM: Started saving build plugins
9:12:28 PM: Finished saving build plugins
9:12:28 PM: Started saving yarn cache
9:13:03 PM: Finished saving yarn cache
9:13:03 PM: Started saving pip cache
9:13:03 PM: Finished saving pip cache
9:13:03 PM: Started saving emacs cask dependencies
9:13:03 PM: Finished saving emacs cask dependencies
9:13:03 PM: Started saving maven dependencies
9:13:03 PM: Finished saving maven dependencies
9:13:03 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums )
9:13:03 PM: Started saving boot dependencies
9:13:03 PM: Finished saving boot dependencies
9:13:03 PM: Started saving rust rustup cache
9:13:03 PM: Finished saving rust rustup cache
9:13:03 PM: Started saving go dependencies
9:13:03 PM: Finished saving go dependencies
9:13:03 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:13:03 PM: Failing build: Failed to build site
9:13:03 PM: Finished processing build request in 7m1.092874116s
That’s still not the entire log. However,
AnuragRamdasan:
9:12:26 PM: Killed
that line is the problem. It means, your build container ran out of memory and system forcefully killed the process.
On Starter accounts, you get 8 GB memory and on other plans you get 11 GB +. If your website doesn’t build within these limits, it would fail.
1 Like