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

"Maximum call stack exceeded" with circular module references #24

Closed
wnayes opened this issue Jan 28, 2022 · 0 comments
Closed

"Maximum call stack exceeded" with circular module references #24

wnayes opened this issue Jan 28, 2022 · 0 comments

Comments

@wnayes
Copy link

wnayes commented Jan 28, 2022

When I tried using electron-reloader in my app, it encountered a stack overflow. I looked into the issue and it seems to be due to some circular module references in my code. In getPaths, the module graph seems to be traversed, and I am seeing this encounter cycles.

I fixed the issue temporarily locally by utilizing the paths Set that was already present:

if (!paths.has(child.filename)) {
    paths.add(child.filename);
    getPaths(child);
}

With a modification like this to getPaths, it appears to work fine.

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