Skip to content

MaxListenersExceededWarning when installing or creating Node.js projects on macOS #49269

@parsasabetz

Description

@parsasabetz

Version

20.5.1

Platform

macOS (darwin)

Subsystem

No response

What steps will reproduce the bug?

I am getting the following warning message when I try to install or create Node.js projects on macOS:

(node:80101) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

I have updated Node.js to the latest version (V20.5.1) and npm was already up to date (V9.8.1). I'm not using any third-party tools, I simply use terminal.

The commands I get the warning after are:
npm install ...
and
npx ...

I'd appreciate if anyone can help me with this. So far i haven't noticed anything wrong in projects or installing process except the warning itself, but I don't understand why should the warning pop-up when I haven't made any changes to any configurations in NPM or node.

How often does it reproduce? Is there a required condition?

It happens every time I try to install (with NPM) or create a project (with NPX), no special condition produces it, it just comes up.

What is the expected behavior? Why is that the expected behavior?

Expected behavior is, NPM should normally just install and NPX should normally just create the project without any warnings!

What do you see instead?

The warning message before completion of install or create:

(node:80101) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions