Azure 应用服务无法 运行 部署命令
Azure app services failed to run deployment command
过去,我能够在我的应用服务的部署槽上部署我的 NodeJS Web 应用。部署是在 portal.azure.com
的部署选项边栏选项卡中完成的,方法是配置 git 存储库和分支等
最近(自上周 1-15-2018 以来的最后几天),所有部署都失败了,包括那些拥有最新产品的分支机构。根据 package.json 文件中的内容,失败似乎是由于 Azure 运行 npm install
造成的。
在 Kudu 门户中,确认部署以错误结束,因为 node_modules
文件夹包含 0 个项目。
正如我所提到的,我什至创建了一个临时部署槽,通过指向代表当前生产的 git 分支来配置其部署选项,因此没有新代码,没有新包,没有任何新东西。这与目前 运行.
的生产完全一样
似乎与 Azure 有关。有没有人经历过类似的事情或知道解决方案? Azure 最近有什么变化吗?
这是捕获的 activity 日志:
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\_logs18-01-22T22_04_26_828Z-debug.log
Failed exitCode=1, command="D:\Program Files (x86)\nodejs.9.0\node.exe" "D:\Program Files (x86)\npm.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\_logs18-01-22T22_04_26_828Z-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu.10102.3204\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
npm ERR! 404 Not Found: ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz
您遇到的错误意味着您的依赖项之一正在尝试获取 ansi-styles
2.2.0 的不可用版本。在这种情况下,您需要找出此依赖项并更新它以解决此问题。
过去,我能够在我的应用服务的部署槽上部署我的 NodeJS Web 应用。部署是在 portal.azure.com
的部署选项边栏选项卡中完成的,方法是配置 git 存储库和分支等
最近(自上周 1-15-2018 以来的最后几天),所有部署都失败了,包括那些拥有最新产品的分支机构。根据 package.json 文件中的内容,失败似乎是由于 Azure 运行 npm install
造成的。
在 Kudu 门户中,确认部署以错误结束,因为 node_modules
文件夹包含 0 个项目。
正如我所提到的,我什至创建了一个临时部署槽,通过指向代表当前生产的 git 分支来配置其部署选项,因此没有新代码,没有新包,没有任何新东西。这与目前 运行.
的生产完全一样似乎与 Azure 有关。有没有人经历过类似的事情或知道解决方案? Azure 最近有什么变化吗?
这是捕获的 activity 日志:
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\_logs18-01-22T22_04_26_828Z-debug.log
Failed exitCode=1, command="D:\Program Files (x86)\nodejs.9.0\node.exe" "D:\Program Files (x86)\npm.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\_logs18-01-22T22_04_26_828Z-debug.log\r\nD:\Program Files (x86)\SiteExtensions\Kudu.10102.3204\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
npm ERR! 404 Not Found: ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz
您遇到的错误意味着您的依赖项之一正在尝试获取 ansi-styles
2.2.0 的不可用版本。在这种情况下,您需要找出此依赖项并更新它以解决此问题。