1

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

最近(自上周 1-15-2018 以来的最后几天),所有部署都失败了,包括那些具有最新生产的分支。失败似乎是由于 Azurenpm install基于 package.json 文件中的内容运行所致。

在 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"
4

1 回答 1

1

npm 错误!404 未找到:ansi-styles@ https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.0.tgz

您收到的错误意味着您的依赖项之一试图获取ansi-styles2.2.0 的不可用版本。在这种情况下,您需要找出此依赖项并对其进行更新以解决此问题。

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

于 2018-01-23T02:35:29.537 回答