-
-
Notifications
You must be signed in to change notification settings - Fork 62
Build failed ERR_STREAM_WRITE_AFTER_END: node v9.7.1 withExEditorHost v3.0.3 archlinux x86_64 #142
Comments
I'm seeing this under node 9.7.1 and npm 5.7.1 as well. It's happening fairly regularly under the
|
The other images don't have the latest npm. The error occurs pretty consistently for node 8.9.4 and 9.7.1 across the
|
downgrade to 5.5.1 npm i npm@5.5.1 -g |
@kimown 5.6.0 seems fine, I think node 9 needs at least that anyway. |
`mhart/alpine-node` was using latest npm for 9.7.1
I strongly suspect this has to do with the new pkgJson transform that got added recently interacting in a funny way with tar but I'll have to squint hard at it and read node-tar's code to figure out what the race is here. /cc @isaacs Thanks for the report! This is handy 👍 |
If I had to guess, my suspicion would be that tar is expecting the transformed stream to be synchronous rather than artificially deferred. What happens if you replace that stream.PassThrough with a MiniPass stream? (Other than getting a teensy bit faster, of course.) |
OK, downgraded
Relevant log :
|
@sputnick-dev you'll need to downgrade node as well in this case |
I can confirm this issue, I stumbled upon it while installing webpack-dev-server and some other devDependencies in a new project but I noted that running Also, there is a note in node-tar's documentation:
This and these logs:
seems to indicate that node-tar already ended the stream when transformed.end is called or that it continues to write data afterward (probably in the callback of ReadEntry.end). |
I'm gonna be mostly on vacation for the next two weeks -- would anyone be interested of putting together a PR and checking that the change actually fixes the problem? |
Thread about this issue is really active on NPM : npm/npm/issues/19989 |
I believe I figured out a problem and fixed it: |
Oh! It should definitely not be emitting |
@isaacs yep, thats what I figured, but the only place where I can replicate it so far is inside a Docker container which makes it extremely difficult to debug. It seems to be a race condition between |
It appears that a race condition involving That flow control hole is plugged in Minipass v2.3.1. |
Perhaps https://github.com/isaacs/minipass/blob/master/index.js#L162 should be moved to line 154. And return early if |
I still see this happening on node 10 and npm 6.1.0 (inside a Docker), running
|
I manually updated |
The root cause is fixed in npm 6.1.1 I believe, not 6.1.0. Should be out soon. |
@stsvilik Are you sure you were running |
OH DUH. libcipm. Thank you, yes. I'll bump that version now. I missed that one :) |
we've done all the updates and next release should fix |
is there an ETA on |
Initially posted here: asamuzaK/withExEditorHost#32
The text was updated successfully, but these errors were encountered: