安装时遇到以下错误本身

时间:2017-05-12 04:53:55

标签: react-native

运行以下命令:

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

任何帮助将不胜感激。 感谢

1 个答案:

答案 0 :(得分:1)

运行以下命令:npm set strict-ssl=false