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

npm install -g json-schema-generator fails with npm ERR! cb() never called! #7146

Closed
iki opened this issue Jan 15, 2015 · 6 comments
Closed

Comments

@iki
Copy link

iki commented Jan 15, 2015

...
npm http fetch GET http://npm-registry01.prd.nytimes.com/wordwrap/-/wordwrap-0.0.2.tgz
npm ERR! cb() never called!

btw, any idea why npm tries to get wordwrap from npm-registry01.prd.nytimes.com, instead of registry.npmjs.org like all other pkgs?

@smikes
Copy link
Contributor

smikes commented Jan 15, 2015

Can you upload your package.json and npm-debug.log as gists? https://gist.github.com

@iki
Copy link
Author

iki commented Jan 16, 2015

There's no package.json, I'm installing the package globally. And npm-debug.log is not generated.

Other colleagues in team are able to reproduce it on different systems (win8, mac, arch linux).

Can you reproduce it by running npm install -g json-schema-generator?

@kenany
Copy link
Contributor

kenany commented Jan 16, 2015

@iki Yeah, I was able to reproduce this but I do not believe it is the fault of npm. Running with a loglevel of "silly", I got a little more info on the error:

npm info attempt registry request try #2 at 07:53:38
npm http fetch GET http://npm-registry01.prd.nytimes.com/wordwrap/-/wordwrap-0.0.2.tgz
npm info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND
npm info attempt registry request try #3 at 07:54:38
npm http fetch GET http://npm-registry01.prd.nytimes.com/wordwrap/-/wordwrap-0.0.2.tgz
npm ERR! cb() never called!

Looks like json-schema-generator has an npm-shrinkwrap.json which specifies a dependency as coming from a registry mirror hosted by nytimes. This doesn't seem to be up and online at the moment, hence npm freezes up and indeed a callback is never called somewhere.

@othiym23 othiym23 added the bug label Jan 17, 2015
@othiym23
Copy link
Contributor

It is always an internal error / a bug when you see cb() never called!. In this case, npm should fail with a better error message after the request to the NYT internal registry times out. In this case, though, it doesn't matter quite as much, because the install is going to fail either way. We'll fix our side of this, but probably not right away, because this is mostly a small problem with usability.

@kenany is right, though, somebody should file a bug on json-schema-generator telling them to either ditch their npm-shrinkwrap.json from the published package, or to make sure that it's not pointing to their private registry when they publish the package to the public registry.

@iki
Copy link
Author

iki commented Jan 19, 2015

thanks @othiym23, reported

@npm-robot
Copy link

We're closing this issue as it has gone thirty days without activity. In our experience if an issue has gone thirty days without any activity then it's unlikely to be addressed. In the case of bug reports, often the underlying issue will be addressed but finding related issues is quite difficult and often incomplete.

If this was a bug report and it is still relevant then we encourage you to open it again as a new issue. If this was a feature request then you should feel free to open it again, or even better open a PR.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

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

No branches or pull requests

5 participants