Gangmax Blog

Resolve npm update 'node-gyp' hung problem

Today When I run the “npm update” command, the update process is hung at this line:

1
2
> ws@0.4.25 install /root/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

I got the solution here:

1
2
3
npm install -g node-gyp # Install the "node-gyp" globally.
cd ~
npm update # Update your personal npm local repository again.

“npm-gyp” is “Node.js native addon build tool”. The “-g” option makes it be installed globally(at “/usr/local/lib/node_modules/node-gyp” in my case).

Comments