Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

React Project Build Fails in Bitbucket Pipelines

Esteban Pisera August 12, 2024

Hi everyone,

I'm encountering an issue when running a pipeline in Bitbucket to build a React application using Docker. During the npm run build step, the process fails with the following error 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.

While the error message suggests a memory issue, it's surprising because the application itself is very basic.

Has anyone experienced a similar issue with a simple app, or has any ideas on what could be causing the build process to fail? Any suggestions on how to troubleshoot or resolve this would be greatly appreciated.

Thanks for your help!

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2024

An easy thing to try is changing to "size" to "2x", "4x" or even "8x". 

Large "size" setting results in more CPU and more memory! If you set it to "8x" and it still fails with that error message, then it is not likely an issue with the memory available.

See: https://support.atlassian.com/bitbucket-cloud/docs/global-options/#Size

Esteban Pisera August 13, 2024

Thank you for the response, in the end, the solution was to add:

definitions:
services:
docker:
memory: 4096

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events