Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 18, 2021 08:21 am GMT

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


Original Link: https://dev.to/aaketk17/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline-1j00

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To