vscode创建react项目中npm淘宝源突然tunneling socket could not be established,
使用命令npm i -D create-react-app
出现
info No lockfile found.
info There appears to be trouble with your network connection. Retrying...
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npm.taobao.org/react: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND web-proxy".
解决
npm config set proxy null
npm config set https-proxy null
npm config set registry http://registry.npmjs.org/
然后就行了
参考(因为是英文没看懂是什么,就运行了上面的命令就可以了)
https://stackoverflow.com/questions/42371380/npm-err-error-connect-econnrefused