Bower未能在Azure上部署

我正在使用Azure部署Node.js Web应用程序。 我已经把Github作为我的部署库,并且像Jay Harris的网页中提到的那样设置了deploy.sh:http://www.cptloadtest.com/2013/12/03/Git-And-Grunt-Deploy-To- Windows的Azure.aspx

我的应用程序依赖于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 bower@1.3.1 C:\DWASFiles\Sites\videogelpub\AppData\npm\node_modules\bower ├── is-root@0.1.0 ├── junk@0.2.2 error: could not lock config file d:/home/.gitconfig: Permission denied ├── stringify-object@0.2.0 ├── abbrev@1.0.4 ├── chmodr@0.1.0 ├── which@1.0.5 ├── osenv@0.0.3 ├── archy@0.0.2 ├── graceful-fs@2.0.3 ├── rimraf@2.2.6 ├── open@0.0.4 ├── bower-endpoint-parser@0.2.1 ├── lru-cache@2.5.0 ├── bower-logger@0.2.2 ├── nopt@2.1.2 ├── retry@0.6.0 ├── mkdirp@0.3.5 ├── tmp@0.0.23 ├── chalk@0.4.0 (has-color@0.1.4, ansi-styles@1.0.0, strip-ansi@0.1.1) ├── q@1.0.1 ├── request-progress@0.3.1 (throttleit@0.0.2) ├── shell-quote@1.4.1 (array-filter@0.0.1, array-map@0.0.0, array-reduce@0.0.0, jsonify@0.0.0) ├── bower-json@0.4.0 (deep-extend@0.2.8, intersect@0.0.3) ├── semver@2.2.1 ├── p-throttler@0.0.1 (q@0.9.7) ├── fstream@0.1.25 (inherits@2.0.1) ├── promptly@0.2.0 (read@1.0.5) ├── fstream-ignore@0.0.7 (inherits@2.0.1, minimatch@0.2.14) ├── tar@0.1.19 (inherits@2.0.1, block-stream@0.0.7) ├── glob@3.2.9 (inherits@2.0.1, minimatch@0.2.14) ├── decompress-zip@0.0.5 (nopt@2.2.0, mkpath@0.1.0, touch@0.0.2, readable-stream@1.1.12, binary@0.3.0) ├── request@2.33.0 (json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, qs@0.6.6, oauth-sign@0.3.0, tunnel-agent@0.3.0, node-uuid@1.4.1, mime@1.2.11, form-data@0.1.2, tough-cookie@0.12.1, http-signature@0.10.0, hawk@1.0.0) ├── cardinal@0.4.4 (ansicolors@0.2.1, redeyed@0.4.4) ├── inquirer@0.4.1 (readline2@0.1.0, mute-stream@0.0.4, through@2.3.4, async@0.2.10, lodash@2.4.1, cli-color@0.2.3) ├── update-notifier@0.1.8 (semver@2.1.0, request@2.27.0, configstore@0.2.3) ├── handlebars@1.3.0 (optimist@0.3.7, uglify-js@2.3.6) ├── bower-config@0.5.0 (optimist@0.6.1, mout@0.6.0) ├── mout@0.9.0 ├── insight@0.3.1 (object-assign@0.1.2, async@0.2.10, lodash.debounce@2.4.1, request@2.27.0, configstore@0.2.3) └── bower-registry-client@0.1.6 (request-replay@0.2.0, lru-cache@2.3.1, async@0.2.10, request@2.27.0, bower-config@0.4.5) 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 

无法弄清楚这一点。

       

网上收集的解决方案 "Bower未能在Azure上部署"

我自己处理这个问题后发现了你的问题,没有find任何资源。 我使用了链接中列出的非常类似的部署文件和脚本,但遇到了类似的错误。

这很令人困惑,因为Azure日志显示所有的东西都是从bower.json文件安装的,而且只是最后的错误。

首先,确保你在npm(node_modules文件夹)中有bower。 它看起来像你。

其次,在你的命令行中运行bower install 。 在我的情况下,它安装了一切,但最后,给了这个消息: 凉亭错误

我select了选项3,因为它是Angular的最新版本,而且我认为它与其他版本兼容。 砰(!)把它添加到bower.json文件夹。 我承诺,推到我的回购,并重新部署在Azure上…这一次,它没有错误部署!