2015-04-12 36 views
0

我使用的Windows 7家庭高級版,我剛從官方網站安裝npm。我嘗試通過npm安裝一些模塊,並顯示下面的日誌。NPM代理問題 - Windows 7家庭高級版

我沒有任何代理配置,直到現在。我正在使用家庭互聯網連接。 我不在公司代理下!

====執行命令 '故宮安裝' ====

npm WARN package.json [email protected] No repository field. 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v0.12.0 
npm ERR! npm v2.5.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 
npm ERR! network read ECONNRESET 
npm ERR! network This is most likely not a problem with npm itself 
npm ERR! network and is related to network connectivity. 
npm ERR! network In most cases you are behind a proxy or have bad network settings. 
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the 
npm ERR! network 'proxy' config is set properly. See: 'npm help config' 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v0.12.0 
npm ERR! npm v2.5.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 
npm ERR! network read ECONNRESET 
npm ERR! network This is most likely not a problem with npm itself 
npm ERR! network and is related to network connectivity. 
npm ERR! network In most cases you are behind a proxy or have bad network settings. 
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the 
npm ERR! network 'proxy' config is set properly. See: 'npm help config' 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! node v0.12.0 
npm ERR! npm v2.5.1 
npm ERR! code ECONNRESET 
npm ERR! errno ECONNRESET 
npm ERR! syscall read 
npm ERR! network read ECONNRESET 
npm ERR! network This is most likely not a problem with npm itself 
npm ERR! network and is related to network connectivity. 
npm ERR! network In most cases you are behind a proxy or have bad network settings. 
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the 
npm ERR! network 'proxy' config is set properly. See: 'npm help config' 

請幫我解決這個問題。

回答

0

我有同樣的問題,但背後i'm代理,但試圖解決這個問題,也許可以幫助你,把這個命令:

nmp config get proxy 

如果您以前poxy配置它顯示你喜歡的預覽配置這個:

http://Domain/User username:[email protected]:port 

這是一個例子,也可以是其他的。問題的關鍵是,如果你有以前的代理服務器配置,你需要輸入以下命令:

npm config set proxy null 

,它有好工作,因爲如果你沒有代理它有沒有問題工作。我希望這對你有所幫助。

相關問題