Gatsby build Error 137

I need advice to debug deploy Netlify App

 npm ERR! code ELIFECYCLE
10:50:32 PM: npm ERR! errno 137
10:50:32 PM: npm ERR! gatsby-starter-default@0.1.0 build: `gatsby build`
10:50:32 PM: npm ERR! Exit status 137
10:50:32 PM: npm ERR!
10:50:32 PM: npm ERR! Failed at the gatsby-starter-default@0.1.0 build script.
10:50:32 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
10:50:32 PM: npm ERR! A complete log of this run can be found in:
10:50:32 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-07-19T01_50_32_817Z-debug.log
10:50:32 PM: ​
10:50:32 PM: ────────────────────────────────────────────────────────────────
10:50:32 PM:   "build.command" failed                                        
10:50:32 PM: ────────────────────────────────────────────────────────────────
10:50:32 PM: ​
10:50:32 PM:   Error message
10:50:32 PM:   Command failed with exit code 137: npm run build
10:50:32 PM: ​
10:50:32 PM:   Error location
10:50:32 PM:   In Build command from Netlify app:
10:50:32 PM:   npm run build
10:50:32 PM: ​
10:50:32 PM:   Resolved config
10:50:32 PM:   build:
10:50:32 PM:     command: npm run build
10:50:32 PM:     commandOrigin: ui
10:50:32 PM:     environment:
10:50:32 PM:       - REVIEW_ID
10:50:32 PM:     publish: /opt/build/repo/public
10:50:32 PM:     publishOrigin: ui

Welcome to Netlify @gabyzif

Unfortunately it appears your deploys log is not public, and you have cut off the upper part of the log you posted (which likely contains clues to the error.)

Can you make your logs public or post the full log.

Hi @gabyzif,

Your build ran out of memory:

7:19:47 AM: success onPreExtractQueries - 0.000s
7:19:47 AM: warning Could not find image "../images/tiktok-placeholder.png" in "/opt/build/repo/src/pages/index.js". Looked for /opt/build/repo/src/images/tiktok-placeholder.png.
7:20:05 AM: success extract queries from components - 18.030s
7:20:32 AM: Killed
7:20:32 AM: npm ERR! code ELIFECYCLE
7:20:32 AM: npm ERR! errno 137
7:20:32 AM: npm ERR! gatsby-starter-default@0.1.0 build: `gatsby build`
7:20:32 AM: npm ERR! Exit status 137

As you can see, it shows Killed. You’d either have to optimise your builds, or build locally and deploy to Netlify.

2 Likes

thanks!!! I’ll check it out

1 Like