Reputation: 1
I am working on an ecommerce application that is multilayered using angular for its frontend. When I serve the application using ng serve
the application is served to my local host but later on it crashes and displays a JS out of memory error and it exits.
I tried increasing the heap memory in my local angular and global angular using --max-old-space-size=4096
in both Packages.json file in my root folder and Windows terminal, but I am still getting this error:
Upvotes: 0
Views: 55
Reputation: 361
step:1 => Open your cmd by Run as administrator
step:2 => go to your project path and run Set NODE_OPTIONS="--max-old-space-size=16384"
step:3 => run project ng serve
Upvotes: 0
Reputation: 36
Try setting up heap memory size to 8192.
PS: Might not be related but try and delete cache of your angular build from .angular to free up space. It can take space in GBs.
Upvotes: 0