CarbonMan
CarbonMan

Reputation: 4490

npm fails trying to install node-inspector

I am trying to use:

npm install -g node-inspector

it fails with

npm ERR! cb() never called!
npm ERR! not ok code 0

Can someone suggest what I have done wrong?

Upvotes: 2

Views: 945

Answers (3)

user3048765
user3048765

Reputation: 11

you can use the --python option to use a different version of Python when installing a module:

npm install [email protected] -g --python=C:\Python27\python.exe

Upvotes: 1

Totty.js
Totty.js

Reputation: 15831

A temporary solution:

  • Grab last version from https://github.com/node-inspector/node-inspector/releases
  • Unzip the folder in your npm global modules, in my case is: "C:\Users\Totty.js\AppData\Roaming\npm\node_modules\"
  • Create a file in "C:\Users\Totty.js\AppData\Roaming\npm\" named "node-inspector.cmd" and fill it with this data:

    @IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" "%~dp0\node_modules\node-inspector\bin\inspector.js" %* ) ELSE ( node "%~dp0\node_modules\node-inspector\bin\inspector.js" %* )

  • Cd into the node-inspector folder "C:\Users\Totty.js\AppData\Roaming\npm\node_modules\node-inspector" and run npm install. It should install all the deps of node-inspector.

  • Run node-inspector now works!

Upvotes: 0

hexacyanide
hexacyanide

Reputation: 91599

This is a bug in some versions of NPM that was later fixed in this commit. A workaround is to call npm cache clear before installing modules, otherwise you should just update NPM.

Upvotes: 0

Related Questions