Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

install fails with cb() never called #3748

georgewfraser opened this Issue Aug 4, 2013 · 19 comments


None yet

Install of pegjs failing with fedora 18:

[george@localhost 5tran]$ sudo npm install -ddd -g pegjs
npm info it worked if it ends with ok
npm verb cli [ 'node', '/bin/npm', 'install', '-ddd', '-g', 'pegjs' ]
npm info using npm@1.3.3
npm info using node@v0.10.13
npm verb node symlink /bin/node
npm verb cache add [ 'pegjs', null ]
npm verb cache add name=undefined spec="pegjs" args=["pegjs",null]
npm verb parsed url { protocol: null,
npm verb parsed url   slashes: null,
npm verb parsed url   auth: null,
npm verb parsed url   host: null,
npm verb parsed url   port: null,
npm verb parsed url   hostname: null,
npm verb parsed url   hash: null,
npm verb parsed url   search: null,
npm verb parsed url   query: null,
npm verb parsed url   pathname: 'pegjs',
npm verb parsed url   path: 'pegjs',
npm verb parsed url   href: 'pegjs' }
npm sill lockFile 8bfe2870-pegjs pegjs
npm verb lock pegjs /root/.npm/8bfe2870-pegjs.lock
npm verb chmod /root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/tmp.tgz 644
npm verb tar unpack /root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/tmp.tgz
npm sill lockFile 9f238dd7-2059-0-34624591981992126-package tar:///root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/package
npm verb lock tar:///root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/package /root/.npm/9f238dd7-2059-0-34624591981992126-package.lock
npm sill lockFile 57072781-2059-0-34624591981992126-tmp-tgz tar:///root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/tmp.tgz
npm verb lock tar:///root/tmp/npm-663-KAlZM44_/1375646072059-0.34624591981992126/tmp.tgz /root/.npm/57072781-2059-0-34624591981992126-tmp-tgz.lock
npm sill gunzTarPerm modes [ '755', '644' ]
npm ERR! cb() never called!
npm ERR! not ok code 0

I'm getting this every time, just trying to update all packages on the system.
Also not sure it is a specific package issue. meteor/meteor#1190

npm update -g

I've tried clearing the cache

npm cache clean

There is no indication to me if a certain package is causing this because running the update command followed by cleaning the cache multiple times, the last package fetched before the error occurs is random.

Also tried re-installing npm

npm install -g npm

which installed successfully but did not resolve the issue

BTW I don't get those other messages. Just a list of package fetches before the error occurs.

very long list of packages
. . . 
npm http GET https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz
npm http 304 https://registry.npmjs.org/minimatch
npm http 200 https://registry.npmjs.org/promzard/-/promzard-0.2.0.tgz
npm http 200 https://registry.npmjs.org/retry/0.6.0
npm http GET https://registry.npmjs.org/retry/-/retry-0.6.0.tgz
npm http 200 https://registry.npmjs.org/read-package-json
npm http 200 https://registry.npmjs.org/npmlog
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/hoek
npm http 200 https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.4.tgz
npm http 200 https://registry.npmjs.org/couch-login
npm http GET https://registry.npmjs.org/couch-login/-/couch-login-0.1.18.tgz
npm http 200 https://registry.npmjs.org/retry/-/retry-0.6.0.tgz
npm http 200 https://registry.npmjs.org/couch-login/-/couch-login-0.1.18.tgz
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/osenv
npm ERR! cb() never called!
npm ERR! not ok code 0

is this possibly a timeout? I get this on a private repo when publishing...takes about 60 seconds when it succeeds, but sometimes gives the same error when it fails.


isaacs commented Aug 28, 2013

What's the output when you install with npm 1.3.9?

c4milo commented Sep 10, 2013

I have this same issue, node v0.8.24, npm 1.2.24. It's very random too. It seems like a race condition somewhere or cache problem.

dfearon commented Sep 25, 2013

Just to mention that I had this problem with NPM version 1.3.11, and solved it simply by re-running the exact same command multiple times. It popped up for a different package on subsequent runs and eventually everything updated successfully.

In my case at least, it seems like it was being caused by a network issue (corrupted downloads). I was also getting an error about an invalid package, which I was able to resolve by deleting all instances of "tmp.tgz".

jgod commented Sep 25, 2013

I have this problem with Node v0.10.19 and npm version v1.3.11. Clearing the cache doesn't help.

jgod commented Sep 25, 2013

Accidentally closed the issue, my bad.

Is anyone planning on addressing this issue, ever?


luk- commented Sep 25, 2013

@georgewfraser can you provide a test case or some reliable way through which I can duplicate the problem?


ForbesLindesay commented Sep 25, 2013

I experienced the same issue when running 64bit node but it was fixed by reverting to 32 bit node. Maybe a bug in 64 bit core?

I experienced this issue today (right around the time @jgod left his comment above) for the first time after upgrading Node from v0.10.18 to v0.10.19, but I don't think that had anything to do with it. I tried what @dfearon suggested (rerunning the npm install command over and over) and eventually the install completed successfully, and as he stated, it had nothing to do with my npm cache or a specific package (would fail on different packages each time I ran it). And the environment I was running into this on was both a precise32 Vagrant box (which negates @ForbesLindesay's comment) and my local OS X install (10.7.5 x86_64).

dfearon commented Sep 26, 2013

I could be wrong about it being a networking issue, by the way. It had just appeared to fit with it being seemingly random and with the "tmp.tgz is not a valid package" problem occurring around the same time. From what others say it may not necessarily be random.

jgod commented Sep 26, 2013

I've tried repeatedly running npm install (looks like this works for some people), but after a dozen times or so, gave up. I don't know how many times it would take to get through a successful install (I have a decent amount of dependencies in my package.json).

We've solved this issue by specifying specific package versions for our dependencies. Using npm 1.3.11.


luk- commented Sep 27, 2013

Can you post your package.json in its entirety?

On Thursday, September 26, 2013, Justin Godesky wrote:

I've tried repeatedly running npm install, but after a dozen times or so,
gave up. I don't know how many times it would take to get through a
successful install (I have a decent amount of dependencies in my

Reply to this email directly or view it on GitHubhttps://github.com/isaacs/npm/issues/3748#issuecomment-25200350

I also experienced this error after upgrading to Node.js 0.10.19 Unlike some of the other posters here I was never able to get my packages to install even after numerous attempts. Eventually I downgraded back to 0.10.18 and the older version of npm and was able to get npm install to work.


juliangruber commented Jul 2, 2014

@isaacs i got a very similar error using latest npm (1.5.0-alpha-1 or so) https://gist.github.com/juliangruber/45d088b6d6209956b54a but it worked repeatedly using 1.3.9


othiym23 commented Sep 17, 2014

I'm pretty sure that this issue is actually addressed in the latest versions of npm. If it's not, and your application (or one of its dependencies) is using an npm-shrinkwrap.json file, you may be encountering #5920, which is actively being worked on now. If you're still encountering this problem as of npm@latest, either reopen the issue or let me know, and I'll reopen the issue. Thanks for your patience, and sorry for the inconvenience.

@othiym23 othiym23 closed this Sep 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment