Getting Failed builds with message : "The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process."

Hi netlify

my netlify site name is offmyyard.com
*I am having Failed builds
here is a link to my build logs: Netlify App
any help with the issue would be higly appreciated

Hi @jarocode, thanks for the post and welcome.
Kindly check out the Support Guide below to see if it helps resolves your issue.

Thanks.

@clarnx thanks for your response, i have read the support guide I was not able to find a solution that relates to the build problem am facing…any other suggestions would be appreciated

1 Like

The issue as @clarnx has pointed out with the linked support guide is your project is attempting to use more resources than are available to it. This can often happen when there are a large number of image transforms.

However I cannot see the build log you linked to so cannot provide any specific suggestions.

1 Like

oh ok…i understand @jasiqli @clarnx . here is a copy of my build logs :

1:51:21 PM: Build ready to start
1:51:27 PM: build-image version: 5f617b3b6e49674a7ec1e08b4f1549b08909a6af (focal)
1:51:27 PM: buildbot version: e57a7547192ed9aa0bcf3dbe320f6331e9d9d5ed
1:51:28 PM: Building without cache
1:51:28 PM: Starting to prepare the repo for build
1:51:28 PM: No cached dependencies found. Cloning fresh repo
1:51:28 PM: git clone --filter=blob:none https://github.com/TechShark3/OffmyyardFrontend
1:51:28 PM: Preparing Git Reference refs/heads/main
1:51:29 PM: Parsing package.json dependencies
1:51:31 PM: Starting to install dependencies
1:51:31 PM: Python version set to 3.8
1:51:31 PM: Attempting Ruby version 2.7.2, read from environment
1:51:32 PM: Using Ruby version 2.7.2
1:51:32 PM: Started restoring cached go cache
1:51:32 PM: Finished restoring cached go cache
1:51:32 PM: go version go1.19.5 linux/amd64
1:51:33 PM: Downloading and installing node v16.20.0...
1:51:33 PM: Downloading https://nodejs.org/dist/v16.20.0/node-v16.20.0-linux-x64.tar.xz...
1:51:34 PM: Computing checksum with sha256sum
1:51:34 PM: Checksums matched!
1:51:36 PM: Now using node v16.20.0 (npm v8.19.4)
1:51:36 PM: Enabling Node.js Corepack
1:51:36 PM: Started restoring cached build plugins
1:51:36 PM: Finished restoring cached build plugins
1:51:36 PM: Started restoring cached corepack dependencies
1:51:36 PM: Finished restoring cached corepack dependencies
1:51:36 PM: Started restoring cached yarn cache
1:51:36 PM: Finished restoring cached yarn cache
1:51:36 PM: Installing Yarn version 1.22.10
1:51:36 PM: Preparing yarn@1.22.10 for immediate activation...
1:51:36 PM: No yarn workspaces detected
1:51:36 PM: Started restoring cached node modules
1:51:36 PM: Finished restoring cached node modules
1:51:37 PM: Installing npm packages using Yarn version 1.22.10
1:51:37 PM: yarn install v1.22.10
1:51:37 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
1:51:37 PM: [1/4] Resolving packages...
1:51:43 PM: warning firebase > @firebase/polyfill > core-js@3.6.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
1:51:44 PM: warning react-google-login@5.2.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
1:51:48 PM: warning redux-devtools-extension@2.13.9: Package moved to @redux-devtools/extension.
1:51:48 PM: [2/4] Fetching packages...
1:52:07 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module.
1:52:07 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
1:52:07 PM: info fsevents@1.2.13: The platform "linux" is incompatible with this module.
1:52:07 PM: info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
1:52:07 PM: [3/4] Linking dependencies...
1:52:07 PM: warning " > @testing-library/user-event@12.8.3" has unmet peer dependency "@testing-library/dom@>=7.21.4".
1:52:07 PM: warning " > antd-img-crop@3.16.0" has unmet peer dependency "prop-types@>=15.6.2".
1:52:07 PM: warning "craco-plugin-scoped-css > babel-plugin-react-scoped-css > @babel/plugin-syntax-jsx@7.18.6" has unmet peer dependency "@babel/core@^7.0.0-0".
1:52:07 PM: warning "react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
1:52:07 PM: warning " > redux-devtools-extension@2.13.9" has unmet peer dependency "redux@^3.1.0 || ^4.0.0".
1:52:07 PM: warning " > styled-components@5.3.9" has unmet peer dependency "react-is@>= 16.8.0".
1:52:25 PM: [4/4] Building fresh packages...
1:52:27 PM: success Saved lockfile.
1:52:27 PM: Done in 49.74s.
1:52:27 PM: npm packages installed using Yarn
1:52:28 PM: Using PHP version 8.0
1:52:29 PM: Install dependencies script success
1:52:29 PM: Starting build script
1:52:29 PM: Using stage install dependencies
1:52:29 PM: Detected 1 framework(s)
1:52:30 PM: "create-react-app" at version "4.0.3"
1:52:30 PM: Section completed: initializing
1:52:31 PM: ​
1:52:31 PM:   Netlify Build                                                 
1:52:31 PM: ────────────────────────────────────────────────────────────────
1:52:31 PM: ​
1:52:31 PM: ❯ Version
1:52:31 PM:   @netlify/build 29.9.0
1:52:31 PM: ​
1:52:31 PM: ❯ Flags
1:52:31 PM:   baseRelDir: true
1:52:31 PM:   buildId: 642585c9758cef0e974228a3
1:52:31 PM:   deployId: 642585c9758cef0e974228a5
1:52:31 PM: ​
1:52:31 PM: ❯ Current directory
1:52:31 PM:   /opt/build/repo
1:52:31 PM: ​
1:52:31 PM: ❯ Config file
1:52:31 PM:   No config file was defined: using default values.
1:52:31 PM: ​
1:52:31 PM: ❯ Context
1:52:31 PM:   production
1:52:31 PM: ​
1:52:31 PM:   1. Build command from Netlify app                             
1:52:31 PM: ────────────────────────────────────────────────────────────────
1:52:31 PM: ​
1:52:31 PM: $ CI=" " npm run build
1:52:31 PM: > offmyyardclient@0.1.0 build
1:52:31 PM: > react-scripts build
1:52:32 PM: (node:5154) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /opt/build/repo/node_modules/postcss-safe-parser/node_modules/postcss/package.json.
1:52:32 PM: Update this package.json to use a subpath pattern like "./*".
1:52:32 PM: (Use `node --trace-deprecation ...` to show where the warning was created)
1:52:32 PM: Creating an optimized production build...
1:52:33 PM: Browserslist: caniuse-lite is outdated. Please run:
1:52:33 PM: npx browserslist@latest --update-db
1:52:33 PM: Why you should do it regularly:
1:52:33 PM: https://github.com/browserslist/browserslist#browsers-data-updating
1:55:47 PM: The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
1:55:47 PM: ​
1:55:47 PM:   "build.command" failed                                        
1:55:47 PM: ────────────────────────────────────────────────────────────────
1:55:47 PM: ​
1:55:47 PM:   Error message
1:55:47 PM:   Command failed with exit code 1: CI=" " npm run build (https://ntl.fyi/exit-code-1)
1:55:47 PM: ​
1:55:47 PM:   Error location
1:55:47 PM:   In Build command from Netlify app:
1:55:47 PM:   CI=" " npm run build
1:55:47 PM: ​
1:55:47 PM:   Resolved config
1:55:47 PM:   build:
1:55:47 PM:     command: CI=" " npm run build
1:55:47 PM:     commandOrigin: ui
1:55:47 PM:     publish: /opt/build/repo/build
1:55:47 PM:     publishOrigin: ui
1:55:49 PM: Caching artifacts
1:55:49 PM: Started saving node modules
1:55:49 PM: Finished saving node modules
1:55:49 PM: Started saving build plugins
1:55:49 PM: Finished saving build plugins
1:55:49 PM: Started saving corepack cache
1:55:49 PM: Finished saving corepack cache
1:55:49 PM: Started saving yarn cache
1:57:00 PM: Finished saving yarn cache
1:57:00 PM: Started saving pip cache
1:57:00 PM: Finished saving pip cache
1:57:00 PM: Started saving emacs cask dependencies
1:57:00 PM: Finished saving emacs cask dependencies
1:57:00 PM: Started saving maven dependencies
1:57:00 PM: Finished saving maven dependencies
1:57:00 PM: Started saving boot dependencies
1:57:00 PM: Finished saving boot dependencies
1:57:00 PM: Started saving rust rustup cache
1:57:00 PM: Finished saving rust rustup cache
1:57:00 PM: Started saving go dependencies
1:57:00 PM: Finished saving go dependencies
1:57:03 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
1:57:03 PM: Failing build: Failed to build site
1:57:03 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
1:57:03 PM: Finished processing build request in 5m35.83s

Hi @jarocode, thanks for the extra information.

The quoted error above is fixed in the latest PostCSS release.

Kindly update PostCSS to the latest version to see if it helps resolve the problem.
Let me know the outcome.

Thanks.

1 Like

thanks @clarnx i will work on that and revert back

1 Like

@clarnx do you have an idea how i can update postCSS since its not listed as a dependency in my package.json

1 Like

Hi @jarocode, kindly follow the information on the official PostCSS issues pages below to learn how to resolve the issue.

Thanks.

hello @clarnx i don’t think post-css is the issue, i have had previous successful builds with that same warning…can we look at the β€œThe build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process.” issue ?

This is because, as I referred to in my earlier post, you project to attempting to use more resources than is available to it. The support guide I previously linked to explains more about this.

If you are unable to optimise your project to work with Netlify build, you may need to consider deploying with Netlify CLI which will build the project on your local machine before deploying to Netlify.

1 Like

thanks for the suggestion @jasiqli , but i can i do branch deploys with netlify CLI?

No. Branch deploys, need a branch to be associated with them, which is only possible with Git-based deploys right now.

@hrishikesh I want to have an admin subdomain…something like admin.mysite.com, what if i checkout to a new branch called admin and run β€˜netlify deploy’ on my root directory would that work?

No, as mentioned before, the data can only come from a Git repo. There’s no branch associated with manual deploys.

This is noted thanks