question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Builds never exits AND `emitter.prependListener is not a function` is thrown

See original GitHub issue

Since #438 and #441 have been closed, but this issue persists and involves both…

Win 10 x64, atom 1.12.0-beta3

I’ve uninstalled sync-settings and atom-beautify and restarted atom, and I’m still getting the Failed to build: emitter.prependListener is not a function error message when building. I don’t find emitter.prependListener being referenced in any other package which I have installed[1].

The build “works” with an .atom-build.yml which contains only cmd: echo Hello world in the root of the project (i.e. prints Hello world), but runs indefinitely after that, and I have to restart atom to attempt to build again.

No errors in the console. Nothing in the console, actually.

[1] There may be an atom core package which pulls in emitter.prependListener in some way, but I don’t have the time to grep through all of their sources (although I did search atom itself).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
boxamacommented, Oct 24, 2016

I’m also having this error. I just updated and managed to catch a stack trace (the notification only gives you a few seconds to do so)

Failed to build.
emitter.prependListener is not a function
Hide Stack Trace
TypeError: emitter.prependListener is not a function
    at prependListener (_stream_readable.js:19:20)
    at Socket.Readable.pipe (_stream_readable.js:584:3)
    at /home/user/.atom/packages/build/lib/build.js:170:25
1reaction
noseglidcommented, Oct 26, 2016

It’s difficult since I never get the error and have no way of reproducing…

Could you try adding something like this.terminal.prependListener = () => { console.log('listener prepended') } at https://github.com/noseglid/atom-build/blob/master/lib/build-view.js#L45, then check the logs and see if you get the ‘listener prepended’ message. This is my best theory at the moment and this could verify/discredit that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Events | Node.js v19.3.0 Documentation
Returns a reference to the EventEmitter , so that calls can be chained. By default, event listeners are invoked in the order they...
Read more >
EventEmitter2/EventEmitter2: A nodejs event emitter ... - GitHub
Adds a listener to the beginning of the listeners array for the specified event. emitter.prependListener('data', function(value1 ...
Read more >
EventEmitter inside custom module throwing '.on(...) is not a ...
I understand with just that code in index.js the event should never get emitted since Test.test('input'); is not called. However, with that line ......
Read more >
mocha/mocha.js - chromium/src/third_party - Git at Google
This is a useful default which helps finding memory leaks. EventEmitter$2.defaultMaxListeners = 10;. EventEmitter$2.init = function() {.
Read more >
Using Event Emitters in Node.js - DigitalOcean
Event emitters are objects in Node.js that trigger an event by sending a message to signal that an action was completed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found