endel / increase-memory-limit

Increase memory limit for local node binaries ("max-old-space-size")
http://npmjs.com/package/increase-memory-limit
MIT License
269 stars 26 forks source link

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #37

Closed dotjohann closed 1 year ago

dotjohann commented 1 year ago

Hi,

Found your fix regarding FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory and ran into an error : ` $ npm run fix-memory-limit npm ERR! code EJSONPARSE npm ERR! path C:\path\to\backend/package.json npm ERR! JSON.parse Unexpected token " " (0xA0) in JSON at position 695 while parsing near "... \"fix-memory-limit\": \"cross-env LIMIT=40..." npm ERR! JSON.parse Failed to parse JSON data. npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\\AppData\Local\npm-cache_logs\2023-01-20T22_21_51_305Z-debug-0.log ` I've followed this link but not sure what I'm missing.

Here is a sample of my package.json` file : stapi_error Compared it with a json validator : json_validator

Please let me know what I'm missing here?

Thanks.

dotjohann commented 1 year ago

Update:

So I found out you can just run this command in your build npm run build -- --no-optimization.

Thanks.