How to fix memory issues for Webpack on large project
Draft Disclaimer: Please note that this article is currently in draft form and may undergo revisions before final publication. The content, including information, opinions, and recommendations, is subject to change and may not represent the final version. We appreciate your understanding and patience as we work to refine and improve the quality of this article. Your feedback is valuable in shaping the final release.
How to fix memory issues for Webpack on large project
debug FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
You can find what is the default value on your computer
node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
Mine was 2Go
= 3Go is what I found working for me
export NODE_OPTIONS=--max_old_space_size=3072