yfouillet
yfouillet

Reputation: 109

Microsoft Azure Webapp deployment error in Production slot

Since the end of August since July we have had problems deploying on WebApps via Azure DevOps or kudu.

the errors that emerge is not really explicit:

2022-09-06T16:11:48.4467209Z Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --basic --sitePath "C:\local\Temp\zipdeploy\extracted"'.
2022-09-06T16:11:48.4468177Z C:\PROGRA~2\SITEEX~1\NODEAP~1\298144~1.4\nodejs\node_modules\open\index.js:38
2022-09-06T16:11:48.4468606Z        } catch {}
2022-09-06T16:11:48.4468848Z                ^
2022-09-06T16:11:48.4468969Z 
2022-09-06T16:11:48.4469262Z SyntaxError: Unexpected token {
2022-09-06T16:11:48.4469684Z     at createScript (vm.js:80:10)
2022-09-06T16:11:48.4470105Z     at Object.runInThisContext (vm.js:139:10)
2022-09-06T16:11:48.4470545Z     at Module._compile (module.js:616:28)
2022-09-06T16:11:48.4471047Z     at Object.Module._extensions..js (module.js:663:10)
2022-09-06T16:11:48.4471513Z     at Module.load (module.js:565:32)
2022-09-06T16:11:48.4471942Z     at tryModuleLoad (module.js:505:12)
2022-09-06T16:11:48.4472389Z     at Function.Module._load (module.js:497:3)
2022-09-06T16:11:48.4472810Z     at Module.require (module.js:596:17)
2022-09-06T16:11:48.4473206Z     at require (internal/module.js:11:18)
2022-09-06T16:11:48.4473789Z     at Object.<anonymous> (C:\PROGRA~2\SITEEX~1\NODEAP~1\298144~1.4\nodejs\node_modules\@azure\identity\dist\index.js:22:12)
2022-09-06T16:11:48.4476491Z C:\PROGRA~2\SITEEX~1\NODEAP~1\298144~1.4\nodejs\node_modules\open\index.js:38\r\n      } catch {}\r\n              ^\r\n\r\nSyntaxError: Unexpected token {\r\n    at createScript (vm.js:80:10)\r\n    at Object.runInThisContext (vm.js:139:10)\r\n    at Module._compile (module.js:616:28)\r\n    at Object.Module._extensions..js (module.js:663:10)\r\n    at Module.load (module.js:565:32)\r\n    at tryModuleLoad (module.js:505:12)\r\n    at Function.Module._load (module.js:497:3)\r\n    at Module.require (module.js:596:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (C:\PROGRA~2\SITEEX~1\NODEAP~1\298144~1.4\nodejs\node_modules\@azure\identity\dist\index.js:22:12)\r\nC:\Program Files (x86)\SiteExtensions\Kudu\97.40810.5869\bin\Scripts\starter.cmd "C:\Program Files (x86)\SiteExtensions\Kudu\97.40810.5869\bin\node_modules\.bin\kuduscript.cmd" -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --basic --sitePath "C:\local\Temp\zipdeploy\extracted"
2022-09-06T16:11:48.4479031Z Deployment Failed.
2022-09-06T16:11:48.4505538Z ##[error]Failed to deploy web package to App Service.
2022-09-06T16:11:48.4513364Z ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.

Upvotes: 1

Views: 453

Answers (1)

yfouillet
yfouillet

Reputation: 109

The problem comes from the version of nodejs configured on the webapp via the appsetting: WEBISTE_NODE_DEFAULT_VERSION

Upgrade from 8.11.1 to 16.9.1 resolve the problem

Upvotes: 2

Related Questions