Azure应用服务无法运行部署命令

时间:2018-01-22 22:24:34

标签: node.js azure deployment continuous-deployment azure-deployment-slots

过去,我可以在我的应用服务的部署插槽上部署我的NodeJS网络应用。通过配置git存储库和分支等,在portal.azure.com中的部署选项刀片中完成部署。

最近(自上周1-15-2018以来的最后几天),所有部署都失败了,包括那些拥有最新产品的分支机构。失败似乎是由于Azure根据package.json文件中的内容运行npm install

在Kudu门户网站,由于node_modules文件夹包含0项,因此确认部署以错误结束。

正如我所提到的,我甚至创建了一个临时部署插槽,通过指向代表当前生产的git分支来配置其部署选项,因此没有新代码,没有新软件包,也没有任何新内容。它与当前正在运行的产品完全相同。

它似乎与Azure有关。有没有人经历类似的事情或知道解决方案? Azure最近有变化吗?

此处列出了已捕获的活动日志:

Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Copying file: '.jscsrc'
Copying file: '.settings'
Copying file: 'APNsAuthKey_7GT9ER2ZH8.p8'
Copying file: 'IISNode.yml'
Copying file: 'loki.json'
Copying file: 'package.json'
Copying file: 'server.js'
Copying file: 'webpack.config.js'
Copying file: 'webpack.local.config.js'
Copying file: 'webpack.stage.config.js'
Copying file: 'client\activate.html'
Copying file: 'client\closepage.html'
Copying file: 'client\Forgot.html'
Copying file: 'client\index-local.html'
Copying file: 'client\index-stage.html'
Copying file: 'client\index.html'
Copying file: 'client\Layout.html'
Copying file: 'client\Login.html'
Copying file: 'client\Signup.html'
Copying file: 'client\bundle\bundle-local.js'
Copying file: 'client\bundle\bundle-local.js.map'
Copying file: 'client\bundle\bundle-stage.js'
Copying file: 'client\bundle\bundle-stage.js.map'
Copying file: 'client\bundle\bundle.js'
Copying file: 'client\bundle\bundle.js.map'
Copying file: 'client\bundle\main-local.js'
Copying file: 'client\bundle\main-local.js.map'
Copying file: 'client\bundle\main-stage.js'
Copying file: 'client\bundle\main-stage.js.map'
Copying file: 'client\bundle\main.js'
Copying file: 'client\bundle\main.js.map'
Copying file: 'client\bundle\styles.css'
Copying file: 'client\bundle\vendors.js'
Copying file: 'client\bundle\fonts\fontawesome-webfont.eot'
Copying file: 'client\bundle\fonts\fontawesome-webfont.svg'
Copying file: 'client\bundle\fonts\fontawesome-webfont.ttf'
Copying file: 'client\bundle\fonts\fontawesome-webfont.woff'
Copying file: 'client\bundle\fonts\fontawesome-webfont.woff2'
Copying file: 'client\bundle\fonts\glyphicons-halflings-regular.eot'
Copying file: 'client\bundle\fonts\glyphicons-halflings-regular.svg'
Copying file: 'client\bundle\fonts\glyphicons-halflings-regular.ttf'
Copying file: 'client\bundle\fonts\glyphicons-halflings-regular.woff'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-300.eot'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-300.svg'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-300.ttf'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-300.woff'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-300.woff2'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-700.eot'
Copying file: 'client\bundle\fonts\open-sans-v13-latin-700.svg'
Omitting next output lines...
Using start-up script server.js from package.json.
Generated web.config.
The package.json file does not specify node.js engine version constraints.
The node.js application will run with the default node.js version 8.9.0.
Selected npm version 5.5.1
npm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\qs-dc69538d\dist\qs.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\append-field-7dfae9c6\test\forms.js'
npm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\base64url-1ec5b32b\typings\globals\node\index.d.ts'
npm WARN server@0.0.0 No description
npm WARN server@0.0.0 No repository field.

npm ERR! code E404
npm ERR! 404 Not Found: ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\local\AppData\npm-cache\_logs\2018-01-22T22_04_26_828Z-debug.log
Failed exitCode=1, command="D:\Program Files (x86)\nodejs\8.9.0\node.exe" "D:\Program Files (x86)\npm\5.5.1\node_modules\npm\bin\npm-cli.js" install --production
An error has occurred during web site deployment.
npm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\qs-dc69538d\dist\qs.js'\r\nnpm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\append-field-7dfae9c6\test\forms.js'\r\nnpm WARN tar ENOENT: no such file or directory, open 'D:\home\site\wwwroot\node_modules\.staging\base64url-1ec5b32b\typings\globals\node\index.d.ts'\r\nnpm WARN server@0.0.0 No description\r\nnpm WARN server@0.0.0 No repository field.\r\n\r\nnpm ERR! code E404\r\nnpm ERR! 404 Not Found: ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR!     D:\local\AppData\npm-cache\_logs\2018-01-22T22_04_26_828Z-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu\70.10102.3204\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

1 个答案:

答案 0 :(得分:1)

  

npm ERR!找不到404:ansi-styles @ https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz

您获得的错误意味着您的某个依赖项试图获取ansi-styles 2.2.0的不可用版本。在这种情况下,您需要找出此依赖关系并更新它以解决此问题。

供参考:NPM throwing 404 error for ansi-styles package