簡體   English   中英

Angular 通用:節點/Javascript Memory 堆在增加 max_old_space_size 后仍然失敗

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

出於某種原因,即使將max_old_space_size更改為 8192,我仍然收到以下錯誤:

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",

這就是我的命令的樣子 ^

筆記:

  1. 使用 nrwl nx 可能與。 不確定。 但是,它在默認值 1.6gb 附近出錯。
  2. 留了個妹子 github 這個問題: https://github.com/nrwl/nx/issues/14054

更新:

能夠通過以下方式解決:

"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",

最終按預期傳播了它。

^ 如果遇到同樣的問題,請隨時嘗試

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM