Skip to content
This repository has been archived by the owner on Aug 17, 2019. It is now read-only.

cipm pulls pacote@7 into npm, along with stream write-after-end heisenbug #52

Closed
JensEggers opened this issue Jun 5, 2018 · 3 comments

Comments

@JensEggers
Copy link

JensEggers commented Jun 5, 2018

npm itself now uses pacote@8, which has this fix (zkat/pacote#151), but I still sometimes encounter zkat/pacote#142 using [email protected] with Node 6.13.1 on macOS. The reason appears to be that cipm still has the old pacote dependency.

@JensEggers
Copy link
Author

The bug is hard to reproduce but seems to happen most often when using npm ci on a slightly flaky mobile internet link.

@JensEggers
Copy link
Author

Here's a representative error log, obtained while running npm ci in a repo with private dependencies. npm hangs indefinitely after the last error.

✘-1 ~/git/fst_bridge [master|✔] 

09:16 $ npm ci

npm WARN prepare removing existing node_modules/ before installation

events.js:160░░░░░░⸩ ⠇ extractTree: sill extractTree [email protected] -> /Users/jens/git/fst_bridge/node_modules/minimist

      throw er; // Unhandled 'error' event

      ^



Error: write after end

    at writeAfterEnd (_stream_writable.js:195:12)

    at PassThrough.Writable.write (_stream_writable.js:242:5)

    at PassThrough.Writable.end (_stream_writable.js:480:10)

    at ReadEntry.entry.on (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/libcipm/node_modules/pacote/lib/extract-stream.js:19:41)

    at emitOne (events.js:101:20)

    at ReadEntry.emit (events.js:188:7)

    at ReadEntry.emit (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:301:25)

    at ReadEntry.[maybeEmitEnd] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:252:12)

    at ReadEntry.end (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:165:27)

    at Unpack.[consumeBody] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)

    at Unpack.[consumeChunkSub] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)

    at Unpack.[consumeChunk] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)

    at Unzip.(anonymous function).on.chunk (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)

    at emitOne (events.js:96:13)

    at Unzip.emit (events.js:188:7)

    at Unzip.emit (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:301:25)

events.js:160     ░⸩ ⠙ extractTree: sill extractTree [email protected] -> /Users/jens/git/fst_bridge/node_modules/unc-path-regex

      throw er; // Unhandled 'error' event

      ^



Error: write after end

    at writeAfterEnd (_stream_writable.js:195:12)

    at PassThrough.Writable.write (_stream_writable.js:242:5)

    at PassThrough.Writable.end (_stream_writable.js:480:10)

    at ReadEntry.entry.on (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/libcipm/node_modules/pacote/lib/extract-stream.js:19:41)

    at emitOne (events.js:101:20)

    at ReadEntry.emit (events.js:188:7)

    at ReadEntry.emit (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:301:25)

    at ReadEntry.[maybeEmitEnd] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:252:12)

    at ReadEntry.end (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:165:27)

    at Unpack.[consumeBody] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)

    at Unpack.[consumeChunkSub] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)

    at Unpack.[consumeChunk] (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)

    at Unzip.(anonymous function).on.chunk (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)

    at emitOne (events.js:96:13)

    at Unzip.emit (events.js:188:7)

    at Unzip.emit (/Users/jens/.nvm/versions/node/v6.13.1/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:301:25)

npm ERR! cancel after 1 retries!

@JensEggers
Copy link
Author

just noticed this is already fixed, closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant