Kevin Le - Khnle
Kevin Le - Khnle

Reputation: 10857

Azure app services failed to run deployment command

In the past I'm able to deploy my NodeJS web app on deployment slots for my app service. The deployment was done in the Deployment options blade in portal.azure.com, by configuring the git repository and branch, etc.

Recently (last few days since last week 1-15-2018), all deployments failed, including those branches that have the latest production. The failure seems to be due to Azure running npm install based on what's in the package.json file.

In Kudu portal, it's confirmed that deployment ended with errors since the node_modules folder contains 0 items.

As I mentioned, I even created a temporary deployment slot, configure its deployment options by pointing to a git branch that represents current production, so there's no new code, no new packages, no new anything. It's exactly as production that is currently running.

It appears something related to Azure. Has anyone experienced something similar or know a solution? Has something in Azure changed recently?

Here's the activity log that's captured:

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 [email protected] No description
npm WARN [email protected] 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 [email protected] No description\r\nnpm WARN [email protected] 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"

Upvotes: 1

Views: 1117

Answers (1)

Aaron Chen
Aaron Chen

Reputation: 9950

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

The error you got means one of your dependencies was trying to fetch unavailable version of ansi-styles 2.2.0. In this case, you'll need to find out this dependency and update it to fix this issue.

For reference: NPM throwing 404 error for ansi-styles package.

Upvotes: 1

Related Questions