DEV Community

Theivendram Athavan
Theivendram Athavan

Posted on

1

Running out of memory when running `craco build` on bitbucket pipline

Image description

got this error when deploying the branch in gitlab. changes made before the deployment were ( in package.json )

"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"format": "prettier --write src//*.ts{,x}",
"lint": "tsc --noEmit && eslint src/
/*.ts{,x}"

},

later fixed this error by modifying the above script as follows

"scripts": {
"start": "craco --max_old_space_size=4096 start",
"build": "craco --max_old_space_size=4096 build",
"test": "craco test",
"eject": "react-scripts eject",
"format": "prettier --write src//*.ts{,x}",
"lint": "tsc --noEmit && eslint src/
/*.ts{,x}"
},

am new to craco. I have used craco to customize the antd theme and followed the guidelines mention in their documentation. later on, I went through the usage of craco but still, I don't have complete knowledge in craco. I need some explanation why it has not given an error without craco and it's giving an error when using craco. so does this mean craco will consume more memory than using react-script start

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay