Coder Social home page Coder Social logo

MaxListenersExceededWarning about npkill HOT 7 CLOSED

voidcosmos avatar voidcosmos commented on May 22, 2024 6
MaxListenersExceededWarning

from npkill.

Comments (7)

zaldih avatar zaldih commented on May 22, 2024 1

Hey guys!
Thank you very much for opening the issue and for all the information provided.

I was never able to work on this because I never managed to replicate the problem UNTIL a while ago I realized that with npm run start -- -d ~ for some reason it did NOT crash. So I tried create a deeeeply nested folders as @EarthlingJim suggest and run npm run build; npm link; npkill (from home) (for simulate a real installation) and GOTCHA!.

I can bump the complete error:

(node:158396) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit
    at _addListener (node:events:595:17)
    at Socket.addListener (node:events:617:10)
    at Socket.Readable.on (node:internal/streams/readable:876:35)
    at Observable._subscribe (file:///home/juanimi/projects/npkill/lib/services/stream.service.js:14:20)
    at Observable._trySubscribe (/home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/operators/catchError.js:12:27
    at OperatorSubscriber.<anonymous> (/home/juanimi/projects/npkill/node_modules/rxjs/dist/cjs/internal/util/lift.js:14:28)

So the problem all along has been here:

stderr.addListener('data', bashErrorHandler);

Indeed, by removing that line, no message will come again.
I'm going to dig deeper into what's going on.

from npkill.

zaldih avatar zaldih commented on May 22, 2024 1

Omggg it can't be ._.

We forgot to delete that particular eventlistener (1 line).

The solution to this problem should be in this commit I just made: 802b2fa

I have to do more extensive testing but I think this problem is solved.

from npkill.

zaldih avatar zaldih commented on May 22, 2024 1

Should be solved in v0.9.0 πŸŽ‰

from npkill.

EarthlingJim avatar EarthlingJim commented on May 22, 2024 1

I can verify that it works perfectly fine now.

As you wrote, even deeeeply nested folders give no problems now. 🀣

Thanks for fixing it, @zaldih ! πŸ‘

from npkill.

retrospct avatar retrospct commented on May 22, 2024

I'm having the same issue on macOS: 10.15.6 npkill: 0.7.1 npx npkill

from npkill.

sauloco avatar sauloco commented on May 22, 2024

Same issue with Windows 10 Pro using npx npkill

from npkill.

EarthlingJim avatar EarthlingJim commented on May 22, 2024

Same issue with Windows 10 Home using npx npkill v0.8.3 (latest version).

This seems to occur when we have deeply nested folders. For example, 5 folders deep, like:
C:\Work\Code\WebDev\ClientX\ProjectY

For my case, npkill does not even detect folders that are 4 layers deep (e.g. those "ClientX" folders), when I run npkill from the root directory (C drive).

So I agree with @quinncomendant that npkill should be able to scan through all deeply nested folders, by either:

  • (A) Having high-enough resource limits by default; or
  • (B) Allowing users to increase these limits (perhaps like a -bruteforce flag?).

from npkill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.