isaacs/npm — Issue #1790: Error: write() after end()
Author: plievone
Created: 2011-11-26 11:01:13+00:00
State: open

`npm install requirejs` fails on Linux :

```
npm ERR! Failed unpacking /home/ubuntu/.npm/requirejs/1.0.2/package.tgz
npm ERR! error installing requirejs@1.0.2 Error: write() after end()
npm ERR! error installing requirejs@1.0.2 at decorate (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:64:36)
npm ERR! error installing requirejs@1.0.2 at Extract.error (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:58:12)
npm ERR! error installing requirejs@1.0.2 at Extract.write (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:71:17)
npm ERR! error installing requirejs@1.0.2 at Unzip.ondata (stream.js:38:26)
npm ERR! error installing requirejs@1.0.2 at Unzip.emit (events.js:67:17)
npm ERR! error installing requirejs@1.0.2 at Object.callback (zlib.js:366:12)
npm ERR! Error: write() after end()
npm ERR! at decorate (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:64:36)
npm ERR! at Extract.error (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/abstract.js:58:12)
npm ERR! at Extract.write (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:71:17)
npm ERR! at Unzip.ondata (stream.js:38:26)
npm ERR! at Unzip.emit (events.js:67:17)
npm ERR! at Object.callback (zlib.js:366:12)
npm ERR! Report this *entire* log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 2.6.32-305-ec2
npm ERR! command "node" "/usr/local/bin/npm" "install" "requirejs"
npm ERR! node -v v0.6.3
npm ERR! npm -v 1.1.0-alpha-2
npm ERR! fstream_class Extract
npm ERR! message write() after end()
npm ERR! fstream_stack Extract.write (/usr/local/lib/node_modules/npm/node_modules/tar/lib/parse.js:71:17)
npm ERR! fstream_stack Unzip.ondata (stream.js:38:26)
npm ERR! fstream_stack Unzip.emit (events.js:67:17)
npm ERR! fstream_stack Object.callback (zlib.js:366:12)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/screen.io/node/npm-debug.log
npm not ok
```

Is there a problem in `fstream`, `tar`, `zlib`, or perhaps in the original `.tgz`-file?