Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular Nx Project: “JavaScript heap out of memory” when building/serving with Kendo UI #396

Open
dineshdesigner08 opened this issue Jan 10, 2025 · 0 comments

Comments

@dineshdesigner08
Copy link

dineshdesigner08 commented Jan 10, 2025

I'm working on an Angular Nx project that uses Kendo UI for Angular components. Recently, I’ve been facing persistent “JavaScript heap out of memory” errors whenever I run the development server or build process.

Error Message FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Logs (abbreviated): <--- Last few GCs ---> [70028:0000020B89251D50] 447688 ms: Mark-sweep ... ... FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

What I’ve Tried Increasing Node.js Memory: I’ve set --max-old-space-size=4096 (and even higher) in NODE_OPTIONS or by using:

node --max-old-space-size=8192 ./node_modules/.bin/nx serve cms This helps temporarily but still doesn’t fully resolve the issue in some cases.

Removing/Optimizing Dependencies: I removed other unused packages and assets, but when Kendo components are in play, the memory usage goes up during build/serve.

Lazy Loading: I’ve ensured large feature modules are lazy-loaded, but it hasn’t eliminated the error.

Upgrading: I have updated my Nx and Angular versions, but the issue still occurs.

please refer the screen shot below

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant