【发布时间】:2017-05-19 11:08:07
【问题描述】:
我在构建 webpack 时遇到了 webpack 示例中的问题:
致命错误:CALL_AND_RETRY_LAST 分配失败 - JavaScript 堆内存不足
package.json
"build": "rimraf dist && node_modules\\.bin\\webpack --config config/webpack.prod.js --progress --profile --bail",
【问题讨论】:
-
尝试节点 --max_old_space_size=4096 选项
-
谢谢@Kasiriveni。我已经在 ngc.cmd 使用过它,但仍然面临这个问题。
-
请更新到最新版本的 npm npm install -g npm@latest
-
在 webpack.config 文件中尝试注释或删除 devtool:'source-map'