运行以下命令:
npm install -g react-native-cli
错误:
25 silly fetchPackageMetaData Error: connect ETIMEDOUT 151.101.72.162:443
25 silly fetchPackageMetaData at Object.exports._errnoException (util.js:1050:11)
25 silly fetchPackageMetaData at exports._exceptionWithHostPort (util.js:1073:20)
25 silly fetchPackageMetaData at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)
25 silly fetchPackageMetaData error for react-native-cli { Error: connect ETIMEDOUT 151.101.72.162:443
25 silly fetchPackageMetaData at Object.exports._errnoException (util.js:1050:11)
25 silly fetchPackageMetaData at exports._exceptionWithHostPort (util.js:1073:20)
25 silly fetchPackageMetaData at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1093:14)
25 silly fetchPackageMetaData code: 'ETIMEDOUT',
25 silly fetchPackageMetaData errno: 'ETIMEDOUT',
25 silly fetchPackageMetaData syscall: 'connect',
25 silly fetchPackageMetaData address: '151.101.72.162',
25 silly fetchPackageMetaData port: 443 }
我认为问题主要是关于代理: 还尝试使用命令设置代理:
set HTTP_PROXY=http://your_proxy:your_port
任何帮助将不胜感激。 感谢
答案 0 :(得分:1)
运行以下命令:npm set strict-ssl=false