11ty / eleventy-plugin-vite

A plugin to use Vite with Eleventy
135 stars 10 forks source link

Possible EventEmitter memory leak detected #44

Closed groenroos closed 3 months ago

groenroos commented 6 months ago

For my (rather sizeable) project, while trying to convert it from Webpack to Vite via eleventy-plugin-vite, I get this warning:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 101 eleventy.resourceModified listeners added to [AsyncEventEmitter]. Use emitter.setMaxListeners() to increase limit

Stack trace points to line 19 of EventBus.js, which sets the max events as 100 (and I guess the size of my project means Eleventy sets more events than that?). This doesn't seem to happen in the non-Vite branch of my project. Manually changing this number to 1000 makes the warning go away.

KiwiKilian commented 4 months ago

Duplicate of https://github.com/11ty/eleventy/issues/3225? Is it possible you also upgraded eleventy to v3 (or a newer alpha) in your vite branch?

KiwiKilian commented 3 months ago

Closing as fixed upstream. Feel free to comment, if the problem still exists with the latest eleventy v3 alpha. Thanks!

groenroos commented 1 month ago

Yep, have since noticed that this is an issue in Eleventy 2.0.1 (regardless of Vite), and does not seem to reoccur in Eleventy 3.0.0-beta.1 (again, regardless of Vite)! Apologies for filing in the wrong repo! 🙏