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

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 –…


This content originally appeared on DEV Community and was authored by Theivendram Athavan

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


This content originally appeared on DEV Community and was authored by Theivendram Athavan


Print Share Comment Cite Upload Translate Updates
APA

Theivendram Athavan | Sciencx (2021-10-18T08:21:17+00:00) Running out of memory when running `craco build` on bitbucket pipline. Retrieved from https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/

MLA
" » Running out of memory when running `craco build` on bitbucket pipline." Theivendram Athavan | Sciencx - Monday October 18, 2021, https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/
HARVARD
Theivendram Athavan | Sciencx Monday October 18, 2021 » Running out of memory when running `craco build` on bitbucket pipline., viewed ,<https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/>
VANCOUVER
Theivendram Athavan | Sciencx - » Running out of memory when running `craco build` on bitbucket pipline. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/
CHICAGO
" » Running out of memory when running `craco build` on bitbucket pipline." Theivendram Athavan | Sciencx - Accessed . https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/
IEEE
" » Running out of memory when running `craco build` on bitbucket pipline." Theivendram Athavan | Sciencx [Online]. Available: https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/. [Accessed: ]
rf:citation
» Running out of memory when running `craco build` on bitbucket pipline | Theivendram Athavan | Sciencx | https://www.scien.cx/2021/10/18/running-out-of-memory-when-running-craco-build-on-bitbucket-pipline/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.