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

npm ERR! cb() never called! (Windows) #1733

Closed
gabipetrovay opened this issue Nov 18, 2011 · 39 comments
Closed

npm ERR! cb() never called! (Windows) #1733

gabipetrovay opened this issue Nov 18, 2011 · 39 comments

Comments

@gabipetrovay
Copy link

Hi,

Trying to install express and I get:

D:\node>npm install -g express
npm ERR! cb() never called!
npm ERR!
npm not ok

What is wrong here?

The npm installation is, I think, OK:

D:\node\npm>node cli.js install npm -gf
D:\node\npm -> D:\node\node_modules\npm\bin\npm-cli.js
D:\node\npm-g -> D:\node\node_modules\npm\bin\npm-cli.js
D:\node\npm_g -> D:\node\node_modules\npm\bin\npm-cli.js
npm@1.0.106 D:\node\node_modules\npm

@coswind
Copy link

coswind commented Nov 19, 2011

Maybe your node directory has space , Like Program Files (x86)
I make it to E:/Nodejs~~~It goes well to me~~Good Luck!

@seanlv
Copy link

seanlv commented Nov 19, 2011

The same issue occurred.

Windows 7 64bit
D:\node\node.exe v0.6.2
D:\node\npm.cmd v1.0.106

npm install express -g
cb() never called!

npm install connect -g
cb() never called!

npm install qs -g
ok!

@gabipetrovay
Copy link
Author

Whitespaces are not the problem here. I have:
D:\node\node.exe
D:\node\npm.cmd
D:\node\npm_g.cmd
D:\node\npm-g.cmd

D:\node\npm <- the source code that when building, generated the npm scripts above.

@devilankur18
Copy link

I am also getting the same error as gabipetrovay mentioned. I have done my setup in C:\node

C:\node>npm install express
npm ERR! cb() never called!
npm ERR!
npm not ok

I have set the NODE_PATH to C:\node and added same to PATH

Details are
Windows 7 64bit
C:\node\node.exe v0.6.2
C:\node\npm.cmd v1.0.106

@mirro
Copy link

mirro commented Nov 19, 2011

I have the same issue

Details:
windows 7 64bit
npm v1.0.106
node v0.6.1
C:\node\npm\bin\npm-cli.js
C:\node\npm\bin\npm_g.cmd
C:\node\npm\bin\npm.cmd
%path% C:\node\

@chowey
Copy link

chowey commented Nov 20, 2011

I have this issue too.

It's really weird because the module goes into the "node_modules" folder, and no debug log gets generated.

The only difference is that the module sometimes doesn't have its own "node_modules" folder for dependencies. If I install the dependencies first, and then the module, I still get the same error but npm does create its own "node_modules" folder and it does install the dependencies there.

Modules with no dependencies install ok.

@chowey
Copy link

chowey commented Nov 20, 2011

More data:

  • If I use -g, npm always gets this error.
  • If I don't use -g, npm gets this error if the module has dependencies that I have not installed first.
  • If I don't use -g and I install dependencies first, npm succeeds.

I am using Windows 7, Node v0.6.2, npm 1.0.106.

@chowey
Copy link

chowey commented Nov 21, 2011

Also, for example with "jade", if I install "commander" first, it installs commander@0.4.1.

But jade requires commander@0.2.x. If I install jade next, then it installs with 0.2.x as a submodule, and it does not throw an error.

@chowey
Copy link

chowey commented Nov 21, 2011

Erm, didn't work on socket.io, which requires redis@0.6.7. When I installed redis@latest, and then socket.io, I still got the error. When I installed redis@0.6.7, and then socket.io, I got no error. So my previous post is not totally accurate. Something to do with the "x" in "0.2.x"?

@mwmwmw
Copy link

mwmwmw commented Nov 22, 2011

As Chowey said, this definitely has something to do with the installation of dependencies "-d"

If I install a package that has no dependencies, it works. If I install all dependencies before the package that depends on them, it works.

If I try to install a package with dependencies without getting the dependencies first... I get the No cb() error.

Maybe redis has dependencies as well that aren't getting installed?

@mwmwmw
Copy link

mwmwmw commented Nov 22, 2011

I think that packages are getting installed correctly despite the error..

@ashblue
Copy link

ashblue commented Nov 22, 2011

Bump on this issue, getting:

P:\node>npm install jade -g
npm ERR! cb() never called!
npm ERR!
npm not ok

Any chance we could get an ETA on a fix? Trying to use npm for an application tutorial and currently suck in a rut with this issue.

@mwmwmw
Copy link

mwmwmw commented Nov 22, 2011

Hey Ashblue,

Try this.

npm install mkdirp -d
then
npm install commander -d
then
npm install jade -d

It installs, npm info ok

@ashblue
Copy link

ashblue commented Nov 22, 2011

Seems to be working okay, but Mongoose is throwing an error about 'bash' now. Might be unrelated to this topic though.

@mwmwmw
Copy link

mwmwmw commented Nov 22, 2011

Oh, yeah, looks like Mongoose might be trying to install a non-windows version of MongoDB.

@ashblue
Copy link

ashblue commented Nov 22, 2011

Seems to be the case. Is there another ticket open for this as I've looked all over and can't find any. I'll open one if nobody else can find one.

Also, looks like expresso is having the same issue.

@avanderhoorn
Copy link

This issue is getting me too... Unfortunately for me the dependency graph of the packages I need is non trivial. Any official word on this issues?

@mwmwmw
Copy link

mwmwmw commented Nov 23, 2011

Me too.

I mean I found a quick work-around and possible clue to the cause, but once you get beyond more than a few dependencies you're going to run into a lot of problems trying to include stuff.

I am going to attempt to create a package and I bet there will be problems with that as well.

@pspaulding
Copy link

I just started seeing this issue after updating npm to the latest version. I wasn't seeing this on the prior version (sorry, don't know what that version was).

@leonate
Copy link

leonate commented Nov 23, 2011

The same issue here.
windows 7 64bit
npm v1.0.106
node v0.6.2

@avanderhoorn
Copy link

Do we have any official word yet on what this might be and/or timeline for when a fix might come?

Also do we know a previous version which it worked. Maybe we can downgrade for a while...

@joesomoza
Copy link

NOT RESOLVED
npm ERR! cb() never called!
npm ERR!
windows 7 64bit
npm v1.0.106
node v0.6.2
npm install -g installs under everyone: C:\Program Files (x86)\nodejs\node_modules
npm install -dd -g eco
npm install -dd -g stitch
npm install -dd -g nomnom
npm install -dd -g brunch

@connec
Copy link

connec commented Nov 24, 2011

Another quirk:

I got the same error, cb() never called, trying to install jade.
npm list -g then showed jade as having unmet dependencies.
I went to the jade folder, and the dependencies seemed to exist installed in the node_modules subdirectory.
I did a local npm list, which showed the dependencies.
I then redid npm list -g and it showed everything being installed :/

@avanderhoorn
Copy link

Hey guys, does anyone know how we can get someone from the team to look at this? At the moment looking through the issue list this seems like the most talked about and widespread issue, yet no official word yet.

I'm even happy to have a go trying to fix it but have no idea where to start. Does anyone have any ideas?

@windcbf
Copy link

windcbf commented Nov 25, 2011

Running into this issue too on Window 7 32bit.

@bluttringer
Copy link

Same issue on win 7 64 trying to install express

@seanlv
Copy link

seanlv commented Nov 25, 2011

please try Node.js 0.6.3 .msi and npm 1.1.0-alpha-2

@chowey
Copy link

chowey commented Nov 25, 2011

Thanks, works for me. npm 1.1.0-alpha-2 comes preinstalled with Node.js 0.6.3.

@avanderhoorn
Copy link

How do we get npm 1.1.0-alpha-2? I've tried "npm update npm -g" and I'm still on 1.0.106.

@chowey
Copy link

chowey commented Nov 25, 2011

Install Node.js 0.6.3 using thie msi. npm comes with it now.

@ashblue
Copy link

ashblue commented Nov 26, 2011

What do we do if we installed the older npm version? Just re-run the msi installer?

@aaronfay
Copy link

I wanted to share my experience, removed previous versions of node via "Add/Remove Programs" and also a hack version I was trying to run based on this guide: http://csell.net/2011/10/20/setting-up-npm-for-node-js-on-windows/

Removed all PATH variable references to other versions, ran the new 0.6.3 msi, install went great, npm installed jade and express just fine, mongoose has a dependency on bash it looks like. So far so good.

@ashblue: the new msi will ask you to uninstall previously installed versions of node.

Windows 7 64

@avanderhoorn
Copy link

Without knowing it I did the same as @aaronfay and it all just worked for me. I think node coming with npm out of the box is a great idea and good step forward. Thanks @seanlv for pointing this fix out!

@rossipedia
Copy link

I just installed node today, and am running into this issue. I have npm version 1.0.106, instead of 1.1.0-alpha-2. How do I get the new version of npm?

@mwmwmw
Copy link

mwmwmw commented Nov 27, 2011

The new version of NPM (1.10-alpha-2) comes with the new Node 6.0.3 installer (http://nodejs.org/dist/v0.6.3/node-v0.6.3.msi).

NPM now comes packaged with the Node.js installer.

To get this to work correctly, uninstall the old version of node and NPM. I ran the uninstaller for node, then I just deleted the NPM folder, and then reinstalled the new version of Node.

I know, this stuff has zero documentation at this point. But, clearly they're working towards a good thing.

@magnetik
Copy link

Confirming that latest node with npm included works fine (Had the same issue while installing jade)

@ricick
Copy link

ricick commented Nov 29, 2011

Also running into this a lot on windows 7 x64 with various packages with nested dependencies.
node v0.6.3 with included npm 1.0.106

@isaacs
Copy link
Contributor

isaacs commented Dec 1, 2011

Can you try with the latest alpha release from http://npmjs.org/dist/ please?

Unpack it in the same folder where node.exe lives.

@isaacs isaacs closed this as completed Dec 1, 2011
@ricick
Copy link

ricick commented Dec 1, 2011

This has fixed it. Cheers.

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

No branches or pull requests