2015-02-24 57 views
0

我在按照以下步驟進行:問題與故宮安裝落後企業代理

第一步:我嘗試使用以下命令

git clone https://github.com/angular/angular-phonecat.git 

回購得到了成功clonned克隆AngularJS教程庫在我的C:\ Git

由於我在公司代理後工作,我從各種論壇檢查,我必須設置http_proxy和https_proxy,所以我執行了Step2。

第二步:創建環境變量http_proxy和https_proxy

http_proxy = http://userid:PASSWORD%24%[email protected]:port 
https_proxy = https://userid:PASSWORD%24%[email protected]:port 

集NPM配置

npm config set proxy http://userid:PASSWORD%24%[email protected]:port 
npm config set http_proxy http://userid:PASSWORD%24%[email protected]:port 
npm config set https_proxy http://userid:PASSWORD%24%[email protected]:port 

(%24 $符號和%25%符號)

第三步: :現在我打開了node.js命令提示符。 我將directroy更改爲C:\ Git \ angular-phonecat並在以下命令中鍵入。

C:\Git\angular-phonecat>npm install 
npm WARN optional dep failed, continuing [email protected] 
| 


> [email protected] install C:\Git\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws 
> (node-gyp rebuild 2> builderror.log) || (exit 0) 


C:\Git\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\ 
npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild 
npm ERR! fetch failed https://registry.npmjs.org/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz 
| 
> [email protected] postinstall C:\Git\angular-phonecat 
> bower install 

bower bootstrap#~3.1.1 ECONNREFUSED Request to https://bower.herokuapp.com/packages/bootstrap failed: connect ECONNREFUSED 

npm ERR! [email protected] postinstall: `bower install` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script. 
npm ERR! This is most likely a problem with the angular-phonecat package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  bower install 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls angular-phonecat 
npm ERR! There is likely additional logging output above. 
npm ERR! System Windows_NT 6.2.9200 
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" 
npm ERR! cwd C:\Git\angular-phonecat 
npm ERR! node -v v0.10.33 
npm ERR! npm -v 1.4.28 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\Git\angular-phonecat\npm-debug.log 
npm ERR! not ok code 0 

任何變通辦法將不勝感激。

+0

需要調用涼亭安裝第一個節點,如果沒有在其的package.json做它含蓄。 – squiroid 2015-02-24 09:32:27

+0

我打電話給鮑爾安裝,我得到這個錯誤涼亭jquery#〜2.1.1 ECONNREFUSED請求https://bower.herokuapp.com/packages/jquery失敗:連接ECONNREFUSED – Yameen 2015-02-24 09:48:21

回答

0

根據您的代理需要,您可能需要安裝中間消化代理(如cntlm,請參閱http://cntlm.sourceforge.net/)。

你可以找到你的圖形瀏覽器使用此命令是什麼代理:(見https://github.com/npm/npm/issues/7156

reg query "HKCU\software\microsoft\windows\currentversion\internet Settings" /v "ProxyServer"