2014-04-01 99 views
6

我正在使用Azure部署Node.js Web應用程序。我已經鏈接Github作爲我的部署回購,並設置瞭如Jay Harris的網頁中提到的deploy.sh:http://www.cptloadtest.com/2013/12/03/Git-And-Grunt-Deploy-To-Windows-Azure.aspxBower在Azure部署上失敗

我的應用依賴於bower,但是當它嘗試部署時,出現bower失敗錯誤。下面是從Azure的日誌輸出:

npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5 
npm http 304 https://registry.npmjs.org/amdefine 
C:\DWASFiles\Sites\videogelpub\AppData\npm\bower -> C:\DWASFiles\Sites\videogelpub\AppData\npm\node_modules\bower\bin\bower 
[email protected] C:\DWASFiles\Sites\videogelpub\AppData\npm\node_modules\bower 
├── [email protected] 
├── [email protected] 
error: could not lock config file d:/home/.gitconfig: Permission denied 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]2, [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
bower angular#1.2.11  not-cached git://github.com/angular/bower-angular.git#1.2.11 
bower angular#1.2.11   resolve git://github.com/angular/bower-angular.git#1.2.11 
bower json3#~3.2.6   not-cached git://github.com/bestiejs/json3.git#~3.2.6 
bower json3#~3.2.6    resolve git://github.com/bestiejs/json3.git#~3.2.6 
bower es5-shim#~2.1.0  not-cached git://github.com/es-shims/es5-shim.git#~2.1.0 
bower es5-shim#~2.1.0   resolve git://github.com/es-shims/es5-shim.git#~2.1.0 
bower jquery#~1.11.0  not-cached git://github.com/jquery/jquery.git#~1.11.0 
bower jquery#~1.11.0   resolve git://github.com/jquery/jquery.git#~1.11.0 
bower angular-cookies#1.2.11  not-cached git://github.com/angular/bower-angular-cookies.git#1.2.11 
bower angular-cookies#1.2.11   resolve git://github.com/angular/bower-angular-cookies.git#1.2.11 
bower angular-route#1.2.11   not-cached git://github.com/angular/bower-angular-route.git#1.2.11 
bower angular-route#1.2.11   resolve git://github.com/angular/bower-angular-route.git#1.2.11 
bower querystring#~3.24.10   not-cached git://github.com/anodynos/node2web_querystring.git#~3.24.10 
bower querystring#~3.24.10   resolve git://github.com/anodynos/node2web_querystring.git#~3.24.10 
bower bootstrap#~3.0.3     cached git://github.com/twbs/bootstrap.git#3.0.3 
bower bootstrap#~3.0.3    validate 3.0.3 against git://github.com/twbs/bootstrap.git#~3.0.3 
bower angular-resource#1.2.11   cached git://github.com/angular/bower-angular-resource.git#1.2.11 
bower angular-resource#1.2.11  validate 1.2.11 against git://github.com/angular/bower-angular-resource.git#1.2.11 
bower angular-sanitize#1.2.11   cached git://github.com/angular/bower-angular-sanitize.git#1.2.11 
bower angular-sanitize#1.2.11  validate 1.2.11 against git://github.com/angular/bower-angular-sanitize.git#1.2.11 
bower underscore#~1.6.0    cached git://github.com/jashkenas/underscore.git#1.6.0 
bower underscore#~1.6.0    validate 1.6.0 against git://github.com/jashkenas/underscore.git#~1.6.0 
bower angular-mocks#1.2.11    cached git://github.com/angular/bower-angular-mocks.git#1.2.11 
bower angular-mocks#1.2.11   validate 1.2.11 against git://github.com/angular/bower-angular-mocks.git#1.2.11 
bower angular-scenario#1.2.11   cached git://github.com/angular/bower-angular-scenario.git#1.2.11 
bower angular-scenario#1.2.11  validate 1.2.11 against git://github.com/angular/bower-angular-scenario.git#1.2.11 
bower json3#~3.2.6     download https://github.com/bestiejs/json3/archive/v3.2.6.tar.gz 
bower angular-cookies#1.2.11   download https://github.com/angular/bower-angular-cookies/archive/v1.2.11.tar.gz 
bower angular-route#1.2.11   download https://github.com/angular/bower-angular-route/archive/v1.2.11.tar.gz 
bower angular#1.2.11     download https://github.com/angular/bower-angular/archive/v1.2.11.tar.gz 
bower angular-cookies#1.2.11   extract archive.tar.gz 
bower angular-cookies#1.2.11   resolved git://github.com/angular/bower-angular-cookies.git#1.2.11 
bower angular-route#1.2.11   extract archive.tar.gz 
bower angular-route#1.2.11   resolved git://github.com/angular/bower-angular-route.git#1.2.11 
bower angular#1.2.11     extract archive.tar.gz 
bower angular#1.2.11     resolved git://github.com/angular/bower-angular.git#1.2.11 
bower json3#~3.2.6     progress received 3.0MB of 4.9MB downloaded, 60% 
bower json3#~3.2.6     progress received 4.0MB of 4.9MB downloaded, 82% 
bower json3#~3.2.6     extract archive.tar.gz 
An error has occurred during web site deployment. 
bower failed 

想不通這一點。

回答

3

我在處理這個問題後發現了你的問題,並且沒有發現任何資源。我使用了鏈接中列出的非常類似的部署文件和腳本,但遇到了與列出內容類似的錯誤。

這很令人困惑,因爲Azure日誌顯示所有內容都是從bower.json文件安裝的,它只在最後出現錯誤。

首先,確保你在npm(node_modules文件夾)中有bower。它看起來像你。

其次,在命令行中運行bower install。在我的情況下,它安裝了所有內容,但最後給出了這條消息: bower error

我選擇了選項3,因爲它是最新版本的Angular,我假設它向後兼容。砰(!)將它添加到bower.json文件夾中。我承諾,推到我的回購站,並重新部署Azure ......這一次,它沒有錯誤地部署!