【问题标题】:Angular 8 error: '"node --max-old-space-size=10240"' is not recognized as an internal or external commandAngular 8 错误:'"node --max-old-space-size=10240"' 未被识别为内部或外部命令
【发布时间】:2020-06-15 16:25:01
【问题描述】:

首先我遇到了限制分配的问题,我尝试在这里使用这个答案来解决这个问题:

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in ionic 3

但在那之后,我有这个问题:

我没有输入这个号码 10240...我不知道这个号码是从哪里来的以及如何解决这个问题。有什么想法吗?

【问题讨论】:

标签: node.js angular angular8


【解决方案1】:

最后,我从我的项目中删除了现有的节点模块文件夹并运行以下命令:

npm install -all
npm audit fix

【讨论】:

  • 它解决了这个问题,但在一次运行后我再次收到此错误。知道为什么吗?
  • 这是文件node_modules\.bin\node-sass.cmd 中的问题,它包含命令node --max-old-space-size=4096。重新安装 npm 模块后,cmd 文件不再包含此命令,并且问题消失了
  • in file` node_modules\.bin\node-sass.cmd` "%_prog%" "%dp0%\..\node --max-old-space-size=4096-sass\ bin\node-sass" %* - 变为"%_prog%" "%dp0%\..\node --max-old-space-size=4096 -sass\bin\node-sass" %* - 在4096 -sass 之间添加空格 - 它在我的情况下引起了问题
猜你喜欢
  • 2012-02-04
  • 2017-06-06
  • 2021-04-25
  • 1970-01-01
  • 2015-01-30
  • 2020-04-12
  • 1970-01-01
  • 2015-09-19
相关资源
最近更新 更多