npm config error

When installing libraries through npm commands, an error occurs with much possibility.

Seems that it is caused by proxy.

npm install error

Basically, there are two ways to solve the problem.

According to stackoverflow

$ npm install <module> --registry http://165.225.128.50:8000

Tested, not work though.

Set the registry explicitly

$ npm config set registry http://registry.npmjs.org
$ npm install -g <module>

Tested, work.