0

I use Angular 7. I am using ng serve --aot -o command to compile my project.

Until now all has worked perfectly. However, suddenly I am suffer an error that say: "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory." I have tried to increase the space-size: --max-old-space-size=8192. But without success, it does not stop compiling.

This is not a memory problem. The problem is that it says compiling over and over again. The error only happens to me and not to my partners.

It works well for all my colleagues. I have tried :

  1. Reinstalling node
  2. Removing node_modules
  3. Clearing cache node
  4. Checking versions compared to my mates
  5. Cloned the project
  • 2
    Check you node version and try to install the correct one for Angular 7, https://stackoverflow.com/questions/60248452/is-there-a-compatibility-list-for-angular-angular-cli-and-node-js?answertab=active#tab-top – Kevin Zhang Dec 18 '20 at 08:31
  • and please share your tsconfig.json – mr. pc_coder Dec 18 '20 at 08:32
  • @pc_coder tsconfig is part of the project, peers have it working and he re-cloned, so its not that, i'd place my bet on the environment binaries. that is cli itself or node or such – Stavm Dec 18 '20 at 08:33
  • @Stavm I had in the past same problem and for using devextreme with changin spme of tsconfig property I solved problem. That is why I asked. – mr. pc_coder Dec 18 '20 at 08:35
  • afaik, this has been an error due to the node version being too low. Try it with node 12.x.x –  Dec 18 '20 at 08:35
  • It does sound like a memory issue - how are you setting the `max_old_space_size`? Can you try `node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve --aot -o` – Will Taylor Dec 18 '20 at 08:41

0 Answers0