npm install fails when deploying NodeJS app to Azure Web App windows

Simon Ström 1 Reputation point
2021-09-21T17:35:27.2+00:00

After a deploy from local git to Web app, P1v2 on Windows, running NodeJS fails to install dependencies with npm install.

Log:
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling node.js deployment.
Creating app_offline.htm
KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot'
Deleting file: 'hostingstart.html'

... copying a bunch of files....

Deleting app_offline.htm
Looking for app.js/server.js under site root.
Using start-up script server.js
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 14.16.0.
Selected npm version 6.14.11
Failed exitCode=-1073741819, command="D:\Program Files (x86)\nodejs\14.16.0\node.exe" "D:\Program Files (x86)\npm\6.14.11\node_modules\npm\bin\npm-cli.js" install --production
An error has occurred during web site deployment.
\r\nD:\Program Files (x86)\SiteExtensions\Kudu\94.30524.5227\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"

I tried to manually configure the deploy.cmd on Kudo earlier but that failed with "Access denied" when trying to add a "call npm install" previusly today (not sure if that is related). Any ideas how to elevate the access rights or any other thing to change?

Thanks!

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,962 questions
{count} votes