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.

"Error: write after end" followed by npm-register crashing

See original GitHub issue

Just started seeing this error on our npm-register server (running version 2.5.2) last night:

Error: write after end
at writeAfterEnd (_stream_writable.js:236:12)
at PassThrough.Writable.write (_stream_writable.js:287:5)
at IncomingMessage.ondata (_stream_readable.js:642:20)
at emitOne (events.js:115:13)
at IncomingMessage.emit (events.js:210:7)
at addChunk (_stream_readable.js:266:12)
at readableAddChunk (_stream_readable.js:253:11)
at IncomingMessage.Readable.push (_stream_readable.js:211:10)
at HTTPParser.parserOnBody (_http_common.js:140:22)
at TLSSocket.socketOnData (_http_client.js:454:20)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
at addChunk (_stream_readable.js:266:12)
at readableAddChunk (_stream_readable.js:253:11)
at TLSSocket.Readable.push (_stream_readable.js:211:10)
at TLSWrap.onread (net.js:585:20)

After this error, the app dies.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
jdxcodecommented, Sep 22, 2017

I’m certainly not arguing this is ok behavior, I’m just giving some color around why it’s happening. I’ve seen these errors come in on our installation and I don’t know if it’s causing the server to crash or not, but because we run this on a couple of instances in tandem and if one crashes another one simply replaces it it’s not causing us any practical issue.

My point again isn’t that this is okay, but it’s also not something worth investigating from my side right now. I’ll certainly accept a PR if someone wants to explore the behavior the CLI has on timeouts though.

0reactions
dgautschcommented, Oct 25, 2018

@jessebye and @protheantom I’m trying to shore up old bugs and this still seems relevant. I understand If you both had to move on at this point, but if you happen to still be running npm-register is this still a problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

code throws error, write after end but why - Stack Overflow
So i made a small api to start up minecraft servers in screen, which works fine. But now, everytime i start or stop...
Read more >
npm ERR! write after end · Issue #20462 - GitHub
I'm opening this issue because: npm is crashing. npm is producing an incorrect install. npm is doing something I don't understand.
Read more >
Let It Crash: Best Practices for Handling Node.js Errors on ...
Ultimately, this ensures that when a crash does happen, you can exit a process and start a new one without much downtime. Node.js...
Read more >
Common errors | npm Docs
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >
No traces when Function crashes - Node js runtime [155215191]
It has been working like that for us for about half a year, but since yesterday, Cloud Functions seem to crash before flushing...
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