Recently installed NODE,NPM has been unsuccessful, finally found a long time to find a solution, reference
Workaround:
Delete the NPMRC file.
Using mirroring
Image use Method (three ways any one can solve the problem, we recommend the use of a third, the configuration is dead, the next time the configuration is still in):
1. Through the config command
12 |
npm config set registry http: //registry.cnpmjs.org npm info underscore (如果上面配置正确这个命令会有字符串response) |
2. Command line designation
1 |
npm --registry http: //registry.cnpmjs.org info underscore |
3. Edit ~/.npmrc
Add to the content below
1 |
registry = http: //registry.cnpmjs.org
|
But I just deleted the NPMRC file.
Many times the NPM configuration is not successful primarily as a path problem
If I delete this NPMRC file, I will reconfigure the path or error
NPM config set prefix "C:\Program files\nodejs\node_global"
And
NPM config set cache "C:\Program files\nodejs\node_cache"
This is still a mistake.
So I was simply to remove the NPMRC file directly again, by default with the path of the system
C:\Users\Administrator\AppData\Roaming\npm\node_modules
The environment variable is then added to the Node_path where the path is done.
I haven't found any problems for the time being.
Node's npm has been wrong.