isaacs/npm — Issue #2134: npm install fails - tar failed to unpack
Author: nibblebot
Created: 2012-02-07 17:18:33+00:00
State: open

npm sill testEngine { name: 'watch-tree',
npm sill testEngine version: '0.1.1',
npm sill testEngine description: 'Yet another library for watching FS trees. Includes a JSON-on-stdout command-line tool and {filePreexisted,allPreexistingFilesReported} events.',
npm sill testEngine url: 'https://github.com/tafa/node-watch-tree',
npm sill testEngine main: 'lib/watch-tree.js',
npm sill testEngine bin: { 'watch-tree': 'bin/watch-tree' },
npm sill testEngine dependencies:
npm sill testEngine { optimist: '>=0.1.2',
npm sill testEngine async: '>=0.1.7',
npm sill testEngine underscore: '>=1.1.4',
npm sill testEngine 'coffee-script': '>=1.0.0',
npm sill testEngine async_testing: '>=0.3.2' },
npm sill testEngine author: 'Andrew Schaaf ',
npm sill testEngine repository:
npm sill testEngine { type: 'git',
npm sill testEngine url: 'git://github.com/tafa/node-watch-tree.git' },
npm sill testEngine _npmUser:
npm sill testEngine { name: 'undefined',
npm sill testEngine email: undefined },
npm sill testEngine _id: 'watch-tree@0.1.1',
npm sill testEngine devDependencies: {} }
npm verb caching /Users/josh/.npm/watch-tree/0.1.1/package/package.json
npm verb loadDefaults watch-tree@0.1.1
npm verb mkdir (expected) error ENOENT, No such file or directory '/var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents'
npm verb mkdir (expected) error ENOENT, No such file or directory '/var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents/___package.npm'
npm verb mkdir done: /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents/___package.npm 755
npm verb unpack_ uid, gid [ undefined, undefined ]
npm verb unpackTarget /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents/package
npm sill gunzTarPerm modes [ '755', '644' ]
npm sill spawning [ 'tar',
npm sill spawning [ '-zmvxpf',
npm sill spawning '/var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/tmp.tgz' ],
npm sill spawning '/var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents/___package.npm' ]
npm sill tar err tar: Unrecognized archive format
npm sill tar err tar: Error exit delayed from previous errors.
npm sill tar exit 1
npm ERR! Failed unpacking /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/tmp.tgz
npm ERR! couldn't unpack /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/tmp.tgz to /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/contents
npm ERR! Error: `tar "-zmvxpf" "/var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/tmp.tgz"`
npm ERR! failed with 1
npm ERR! at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/tar.js:217:20)
npm ERR! at ChildProcess.emit (events.js:67:17)
npm ERR! at Socket. (child_process.js:172:12)
npm ERR! at Socket.emit (events.js:64:17)
npm ERR! at Array.1 (net.js:831:12)
npm ERR! at EventEmitter._tickCallback (node.js:126:26)
npm ERR! Report this *entire* log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Darwin 11.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-ddd"
npm ERR! cwd /Users/josh/code/X
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.106
npm verb exit [ 1, true ]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/josh/code/X/npm-debug.log
npm not ok

```
$ tar --version
bsdtar 2.8.3 - libarchive 2.8.3
```
error happens on a couple of different packages and sometimes this package succeeds but it will fail on a different one

```
$ less /var/folders/pc/kptb0k7d2wg6ymzmtypz_pnr0000gn/T/npm-1328634482643/1328634482643-0.23001905088312924/tmp.tgz

502 Bad Gateway

502 Bad Gateway

nginx/1.0.4

```