简体   繁体   中英

Angular Universal: Node/Javascript Memory heap still failing after upping max_old_space_size

For some reason, even after changing max_old_space_size to 8192 I am still getting the error that:

FATAL ERROR: invalid table size Allocation failed - JavaScript heap out of memory
"start": "export NODE_OPTIONS=--max_old_space_size=8192 && nx run zeta-frontend:serve-ssr",

This is what my command looks like ^

Notes:

  1. Using nrwl nx might have to do with. Not sure. However, it is erroring out at around the default of 1.6gb.
  2. Left a sister github issue for this one: https://github.com/nrwl/nx/issues/14054

UPDATE:

Was able to solve via the following:

"ng": "node --max-old-space-size=8192 ./node_modules/.bin/ng",
"nx": "node --max-old-space-size=8192 ./node_modules/.bin/nx",
"start:serve": "npm run nx -- run zeta-frontend:serve",

That finally propagated it as expected.

^ feel free to try if have the same problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM