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.

Write After End Error

See original GitHub issue

On the initial run the task has no problems. However, when I use gulp.watch the subsequent run of the task throws this error. I have two different tasks being watched and they seem to behave as expected with no error.

Error: write after end
    at writeAfterEnd (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modules
\vinyl-map\node_modules\through2\node_modules\readable-stream\lib\_stream_writab
le.js:134:12)
    at Transform.Writable.write (C:\Users\Greg Waxman\Documents\Git\stream-web\n
ode_modules\vinyl-map\node_modules\through2\node_modules\readable-stream\lib\_st
ream_writable.js:182:5)
    at write (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modules\gulp-ja
de\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:58
7:24)
    at flow (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modules\gulp-jad
e\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:596
:7)
    at Transform.pipeOnReadable (C:\Users\Greg Waxman\Documents\Git\stream-web\n
ode_modules\gulp-jade\node_modules\through2\node_modules\readable-stream\lib\_st
ream_readable.js:628:5)
    at Transform.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modules
\gulp-jade\node_modules\through2\node_modules\readable-stream\lib\_stream_readab
le.js:412:10)
    at emitReadable (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modules\
gulp-jade\node_modules\through2\node_modules\readable-stream\lib\_stream_readabl
e.js:408:5)
    at readableAddChunk (C:\Users\Greg Waxman\Documents\Git\stream-web\node_modu
les\gulp-jade\node_modules\through2\node_modules\readable-stream\lib\_stream_rea
dable.js:169:9)
    at Transform.Readable.push (C:\Users\Greg Waxman\Documents\Git\stream-web\no
de_modules\gulp-jade\node_modules\through2\node_modules\readable-stream\lib\_str
eam_readable.js:131:10)

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
andyscottcommented, Mar 6, 2014

Gah! I figured it out. It was my mistake in reusing my pipe!

0reactions
n8agrincommented, Dec 26, 2015

This also helped me with gulp-filter. Non-obvious and really frustrating. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Write After End error in node.js webserver - Stack Overflow
I am struggling with my node.js hobby project due to a "write after end" Error. I have a created a node.js webserver that...
Read more >
Error: write after end (Example) | Treehouse Community
Node is asynchronous, which means that functions happen at the same time. Write after end means that something is being written after the...
Read more >
Error [ERR_STREAM_WRITE_AFTER_END]: write after end
Anytime the flow goes into res.code().end() it throws ERR_STREAM_WRITE_AFTER_END . If I use return it seems to work fine. if (! ...
Read more >
Node.js Stream writable.end() Method - GeeksforGeeks
Here an error is displayed as write() method is called after end() method which is not possible. Reference: https://nodejs.org/api/stream.html# ...
Read more >
Errors | Node.js v19.3.0 Documentation
This is a list of system errors commonly-encountered when writing a ... An attempt was made to call stream.write() after stream.end() has been...
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