当我使用Ionic serve命令运行Ionic 3项目时,我会得到这个错误:
当前回答
我在CentOS服务器7上也有同样的问题,但这解决了我的问题:
node --max-old-space-size=X node_modules/@angular/cli/bin/ng build --prod
其中X =(2048或4096或8192 o..)是内存的值。
其他回答
我在Angular上也遇到了同样的问题。然后我写了
"serve": "node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng serve"
要打包的脚本。Json脚本,为我解决了这个问题。
并运行project this命令:
npm run serve
我删除了现有的Node.js模块,并运行以下命令来解决我的问题:
npm install -all
npm audit fix
我在CentOS服务器7上也有同样的问题,但这解决了我的问题:
node --max-old-space-size=X node_modules/@angular/cli/bin/ng build --prod
其中X =(2048或4096或8192 o..)是内存的值。
对于我来说,我有一个语法错误(没有显示出来),并导致了这个错误。
有时候简单是成功的关键。在你的代码中搜索while (i <= 10000){}而不增加i;)