npm代理设置
1 | npm config proxy socks5://127.0.0.1:1080 |
但上面设置好了之后,遇到了
1 | npm ERR! E418 |
看到how-do-i-solve-the-npm-418-im-a-teapot-error-when-trying-to-use-npm-install说要将npmrc
的registry
URL从http
协议改成https
1 | npm config set registry https://registry.npmjs.org/ |
改了之后确实有效