2017-05-12 61 views
0

跑follwing命令:在安裝入門以下錯誤反應本土

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 

任何幫助將不勝感激。 感謝

+2

什麼錯誤?我猜不出 –

+1

[有沒有辦法讓npm install(該命令)在代理後面工作?](http://stackoverflow.com/questions/7559648/is-there-a-way-to -make-NPM-安裝-的命令對工作落後代理)。端口443是SSL,所以你也需要'設置HTTPS_PROXY'。 –

+0

我想我已經在問題中添加了這個答案,但它沒有奏效。@ KenY-N –

回答

1

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