Skip to content

MaxListenersExceeded warning on dev server startup (Astro 6.x) #15883

@dickjohnpaul

Description

@dickjohnpaul

Astro Info

Astro                    v6.0.3
Node                     v22.22.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/mdx
                         @astrojs/svelte

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When starting the dev server in Astro 6.0.3, I get the following warning:

(node:35) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 change listeners added to [FSWatcher]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit

This is a fresh install of the latest version of AstroJS with MDX, Svelte, and Tailwind, using the npx astro add command to add the integrations.

I'm not sure if this is related to #15730 or not since it's under different circumstances.

I have not tested removing integrations to see which integration might be setting it over the limit.

Something I'm also seeing in Stackblitz, but not locally, may need a separate issue:

(node:35) ExperimentalWarning: WASI is an experimental feature and might change at any time (Use 'node --trace-warnings ...' to show where the warning was created)

What's the expected result?

When we start up a dev server with integrations (MDX, Tailwind, Svelte in this case) the server should manage to start without warnings.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/withastro-astro-d3saenfk

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P3: minor bugAn edge case that only affects very specific usage (priority)pkg: astroRelated to the core `astro` package (scope)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions