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

Out of Memory triggered by certain sourcemaps #193

Open
ersimont opened this issue Jan 3, 2025 · 0 comments
Open

Out of Memory triggered by certain sourcemaps #193

ersimont opened this issue Jan 3, 2025 · 0 comments

Comments

@ersimont
Copy link

ersimont commented Jan 3, 2025

Trying to simply load() @js-sdsl/ordered-map in its versions 4.2-4.4 results in

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

This happens because that library includes index.js in its list of sources for index.js.map, which leads to an infinite loop in Node.load().

I don't know enough about sourcemaps to say if this setup is legal/valid. I'll open a ticket in that library too if you say it's wrong/incorrect, and pass along any other info you think will help them. Either way, it took several hours to track this down. This ticket is a request to either:

  • Detect this situation, handle it, and succeed
  • Detect this situation, abort, and print a meaningful error message
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