2

First I had the issue with limit allocation and I tried to resolve that using this answers here:

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

But after that, I have this issue:

enter image description here

I didn't type this number 10240... I don't know where is this number from and how to solve the problem. Any idea?

nemostyle
  • 794
  • 4
  • 11
  • 32

2 Answers2

6

Finally, I deleted the existing node module folder from my project and run the below commands:

npm install -all
npm audit fix
nemostyle
  • 794
  • 4
  • 11
  • 32
  • it solves the issue but after a single run I get this error again. know why? – Noy Oliel May 17 '20 at 08:52
  • it was issue in file `node_modules\.bin\node-sass.cmd` it contains command `node --max-old-space-size=4096` . After reinstalling npm modules cmd file does not contain this command anymore and issue is gone – Oleg Bondarenko Jan 15 '21 at 09:15
  • in file` node_modules\.bin\node-sass.cmd` "%_prog%" "%dp0%\..\node --max-old-space-size=4096-sass\bin\node-sass" %* - becomes to `"%_prog%" "%dp0%\..\node --max-old-space-size=4096 -sass\bin\node-sass" %*` - adding space between `4096 -sass` - it caused issue in my case – Oleg Bondarenko Jan 19 '21 at 13:07
1

If anyone else is still having this issue: the solution for me was to run a script via node once, which converts all "%prog%" into %prog% in each cmd file in node-modules like this one

Link
  • 61
  • 1
  • 7