• Register
0 votes
194 views

Problem :

I am new to the Ionic3. If I try to run my ionic 3 project using the below command

 "ionic serve" then facing below error:

Ineffective mark-compacts near heap limit allocation failed - javascript heap out of memory

How can I fix the above issue.

8 4 2
2,300 points

1 Answer

0 votes

Solution :

I had faced this issue sometimes back. I followed below method to fix this issue.

Below one command helped me to resolve the issue:
export NODE_OPTIONS="--max-old-space-size=8192"
This error is probably because of your memory leak or difference between the Node <= 10 and Node > 10 manage the memory. So increasing your memory allocated to your Node will allow the program to run properly but it may not completely solve the real problem and it may happen that your memory limit could be reached again. That’s why I am advising for profiling memory usage in your node process whenever it starts running.

I had the problem with the memory leak.

And it clearly suggested to increase my memory, in my terminal where I was running my Node process:

export NODE_OPTIONS="--max-old-space-size=8192"
The values of the max-old-space-size can be in the range of: [2048, 4096, 8192, 16384]

Hope you understood the solution for your issue.

5 2 1
4,980 points

Related questions

0 votes
1 answer 6 views
6 views
Problem: I get this error when I run ng build-prod 92% asset optimization piece <--- last few GCs - - ->  [4136: 0155D210] 443646 MS: mark-sweep 703.5 (770.3) -> 703.6 (759.8) MB, 2162.2 / 0.0 MS (+ 0.0 MS in 0 steps from start of mark, largest ... . I tried increasing the node memory with "npm i increase-memory-limit" and increased the limit to 2GB . I am using angular 4. Node version is 8.9.4
asked 5 days ago sasha 1.2k points
0 votes
1 answer 28 views
28 views
Problem: I have already cloned my old project and then executed npm install and after that I also run ionic serve But unfortunately I came across below ionic error: [ERROR] @ionic/app-scripts is required for ionic serve to work properly. Looks like @ionic/app-scripts isn't installed in this project. This package is required for ionic serve in ionic/angular 4 projects.
asked Aug 6 Raphael Pacheco 4.9k points
1 vote
1 answer 33 views
33 views
Problem: I have written a very simple application. Please find below the code for my simple application which is calling the API in each second. After each of the call a chrome memory allocation size for that particular tab increases continuously. But not by the reducing that memory. ... xhttp.send();     } </script> </body> </html> Kindly help me in finding out the root cause of this issue.
asked May 27 Martin K 6.6k points
1 vote
2 answers 178 views
178 views
Problem : I am very new to Ionic, I have recently started working on Ionic but I am facing below error: Runtime Error Uncaught (in promise): Error: Module build failed: Error: ENOENT: no such file or directory, open '/Users/stewart/Development/ionic/theWhoZoo/src/pages ... say they do match. import { MyRatingModel } from '../model/myratingModel'; How can I fix above error need Ionic expert help.
asked Apr 22 stewart 4k points