isaacs/npm — Issue #1739: npm install fails on OS X 10.6.8 (tar?)
Author: lutzbickhardt
Created: 2011-11-20 18:30:59+00:00
State: open

/***** on a freshly upgraded OSX 10.6.8 I get the tar related problem when installing NPM
/***** this issue is all over the forums, so I checked the tar version:

imac-27_lan:npm lutzbickhardt$ which tar
/usr/local/bin/tar
imac-27_lan:npm lutzbickhardt$ /usr/local/bin/tar --version
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

imac-27_lan:npm lutzbickhardt$ tar --version
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

/***** adding --version to npm/lib/utils/tar.js produces:
imac-27_lan:npm lutzbickhardt$

silly tar out tar (GNU tar) 1.26
silly tar out Copyright (C) 2011 Free Software Foundation, Inc.
silly tar out License GPLv3+: GNU GPL version 3 or later .
silly tar out This is free software: you are free to change and redistribute it.
silly tar out There is NO WARRANTY, to the extent permitted by law.
silly tar out Written by John Gilmore and Jay Fenlason.

/***** it seems I have the correct GNU and not the BSD tar, still it fails to build:

info it worked if it ends with ok
verbose cli [ 'node',
verbose cli '/Users/lutzbickhardt/npm/cli.js',
verbose cli 'install',
verbose cli 'npm',
verbose cli '-gf' ]
info using npm@1.0.106
info using node@v0.6.1
verbose config file /Users/lutzbickhardt/.npmrc
verbose config file /usr/local/etc/npmrc
verbose config file /Users/lutzbickhardt/npm/npmrc
silly exec /usr/local/bin/node "/Users/lutzbickhardt/npm/bin/npm-get-uid-gid.js" "nobody" 20
silly spawning [ '/usr/local/bin/node',
silly spawning [ '/Users/lutzbickhardt/npm/bin/npm-get-uid-gid.js',
silly spawning 'nobody',
silly spawning 20 ],
silly spawning null ]
silly output from getuid/gid {"uid":-2,"gid":20}
silly output from getuid/gid
verbose into /usr/local/lib [ 'npm' ]
verbose cache add npm
verbose cache add [ 'npm', null ]
silly cache add: name, spec, args [ undefined, 'npm', [ 'npm', null ] ]
verbose parsed url { pathname: 'npm', path: 'npm', href: 'npm' }
info addNamed [ 'npm', '' ]
verbose addNamed [ null, '' ]
verbose GET npm
verbose raw, before any munging npm
verbose url resolving [ 'https://registry.npmjs.org/', './npm' ]
verbose url resolved https://registry.npmjs.org/npm
verbose etag "80MX9MB4R7RI8VGIJU3PJ8JJC"
silly get cb [ 304,
silly get cb { server: 'CouchDB/1.1.0 (Erlang OTP/R14B04)',
silly get cb etag: '"80MX9MB4R7RI8VGIJU3PJ8JJC"',
silly get cb date: 'Sun, 20 Nov 2011 17:45:51 GMT',
silly get cb 'content-length': '0' } ]
verbose etag npm from cache
verbose GET npm/1.0.106
verbose raw, before any munging npm/1.0.106
verbose url resolving [ 'https://registry.npmjs.org/', './npm/1.0.106' ]
verbose url resolved https://registry.npmjs.org/npm/1.0.106
verbose etag "80MX9MB4R7RI8VGIJU3PJ8JJC"
silly get cb [ 304,
silly get cb { server: 'CouchDB/1.1.0 (Erlang OTP/R14B04)',
silly get cb etag: '"80MX9MB4R7RI8VGIJU3PJ8JJC"',
silly get cb date: 'Sun, 20 Nov 2011 17:45:52 GMT',
silly get cb 'content-length': '0' } ]
verbose etag npm/1.0.106 from cache
verbose bin dist [ '0.6-ares1.7.5-DEV-evundefined-openssl0.9.8l-v83.6.6.7-darwin-x64-10.8.0',
verbose bin dist { shasum: 'ef1830b68a1537a606dae3bdee71fd1153d7e71e',
verbose bin dist tarball: 'http://registry.npmjs.org/npm/-/npm-1.0.106.tgz' } ]
verbose addRemoteTarball [ 'https://registry.npmjs.org/npm/-/npm-1.0.106.tgz',
verbose addRemoteTarball 'ef1830b68a1537a606dae3bdee71fd1153d7e71e' ]
verbose mkdir (expected) error ENOENT, no such file or directory '/tmp/npm-1321811152455'
verbose mkdir (expected) error ENOENT, no such file or directory '/tmp/npm-1321811152455/1321811152455-0.43388166604563594'
verbose mkdir done: /tmp/npm-1321811152455/1321811152455-0.43388166604563594 755
info fetch https://registry.npmjs.org/npm/-/npm-1.0.106.tgz
verbose fetch to /tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz
silly updated sha bytes 40960
...
silly updated sha bytes 40960
info shasum ef1830b68a1537a606dae3bdee71fd1153d7e71e
info shasum /tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz
verbose mkdir (expected) error ENOENT, no such file or directory '/tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents'
verbose mkdir (expected) error ENOENT, no such file or directory '/tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents/___package.npm'
verbose mkdir done: /tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents/___package.npm 755
verbose unpack_ uid, gid [ 501, 20 ]
verbose unpackTarget /tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents/package
silly gunzTarPerm modes [ '755', '644' ]
silly spawning [ 'tar',
silly spawning [ '-zmvxpf ',
silly spawning '/tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz',
silly spawning '-o' ],
silly spawning '/tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents/___package.npm' ]
silly tar err tar (child): : Cannot open: No such file or directory
silly tar err tar (child): Error is not recoverable: exiting now
silly tar err tar: Child returned status 2
silly tar err tar: Error is not recoverable: exiting now
silly tar exit 2
ERR! Failed unpacking /tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz
ERR! couldn't unpack /tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz to /tmp/npm-1321811152455/1321811152455-0.43388166604563594/contents
ERR! Error: `tar "-zmvxpf " "/tmp/npm-1321811152455/1321811152455-0.43388166604563594/tmp.tgz" "-o"`
ERR! failed with 2
ERR! at ChildProcess. (/Users/lutzbickhardt/npm/lib/utils/tar.js:217:20)
ERR! at ChildProcess.emit (events.js:70:17)
ERR! at maybeExit (child_process.js:359:16)
ERR! at Socket. (child_process.js:464:7)
ERR! at Socket.emit (events.js:67:17)
ERR! at Array.0 (net.js:300:10)
ERR! at EventEmitter._tickCallback (node.js:192:40)
ERR! Report this *entire* log at:
ERR!
ERR! or email it to:
ERR!
ERR!
ERR! System Darwin 10.8.0
ERR! command "node" "/Users/lutzbickhardt/npm/cli.js" "install" "npm" "-gf"
ERR! cwd /Users/lutzbickhardt/npm
ERR! node -v v0.6.1
ERR! npm -v 1.0.106
verbose exit [ 1, true ]

/****** what did I do wrong?

Cordialement

--------------------------
Lutz BICKHARDT