FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory - webpack sample Angular 2

拜拜、爱过 提交于 2021-02-18 19:00:48

问题


I am facing an issue in webpack sample while getting webpack build:

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

package.json

"build": "rimraf dist && node_modules\\.bin\\webpack --config config/webpack.prod.js --progress --profile --bail",

回答1:


Every single time when i got the same error i managed to solve the issue using the --max_old_space_size option.

My guess would be that either --max_old_space_size=4096 is not enough (just use a higher value) or that the option is not applied in the right place.

I would try:

"build": "rimraf dist && node --max-old-space-size=8192 node_modules\\.bin\\webpack --config config/webpack.prod.js --progress --profile --bail"


来源:https://stackoverflow.com/questions/44068494/fatal-error-call-and-retry-last-allocation-failed-javascript-heap-out-of-memo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!