Search code examples
npmnode-inspector

npm install node-inspector always suspends


I recently study node and try to use npm to install node-inspector globally. But it always suspends here as following pic

problem pic

I have changed the registry config for times, but it still doesn't work. Anyone can help? TAT


Solution

  • When npm install is stuck, you can increase verbosity of the output from install.

    npm config set loglevel verbose
    npm install -g node-inspector
    

    Setting the log level to verbose will output a LOT of information. Based on the output you can find out where the errors/warnings are occurring and resolve them.

    If git protocol is somehow involved and git's port is being blocked (TCP 9418), you could use https by doing

    git config --global url.https://github.com/.insteadOf git://github.com/
    npm install -g node-inspector
    

    As you mentioned, you could use cnpm. Feel free to write your own answer and accept that one since that solved your problem.