skip to Main Content

I am trying to redeploy a legacy react application via Zip Deploy. The application hasn’t changed, but the deployment is now failing. I reverted to a previous deployment zip (that was successfully deploy in November 2022) and it fails with the same error message. Here is the error trace:

1:39:11 PM diningmanagermobile-dev: Creating zip package...
1:39:13 PM diningmanagermobile-dev: Zip package size: 3.35 MB
1:39:15 PM diningmanagermobile-dev: Updating submodules.
1:39:15 PM diningmanagermobile-dev: Preparing deployment for commit id '0866cdcc18'.
1:39:16 PM diningmanagermobile-dev: Generating deployment script.
1:39:16 PM diningmanagermobile-dev: Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "C:localTempzipdeployextracted" -o "C:homesitedeploymentstools" --basic --sitePath "C:localTempzipdeployextracted"'.
1:39:17 PM diningmanagermobile-dev: C:PROGRA~2SITEEX~1NODEAP~1296456~1.8
1:39:17 PM diningmanagermobile-dev: odejsbuildsrcLoader.js:153
1:39:17 PM diningmanagermobile-dev:                 ...StatusLogger.DEFAULT_STATUS,
1:39:17 PM diningmanagermobile-dev:                 ^^^
1:39:17 PM diningmanagermobile-dev: SyntaxError: Unexpected token ...
1:39:17 PM diningmanagermobile-dev:     at createScript (vm.js:56:10)
1:39:17 PM diningmanagermobile-dev:     at Object.runInThisContext (vm.js:97:10)
1:39:17 PM diningmanagermobile-dev:     at Module._compile (module.js:542:28)
1:39:17 PM diningmanagermobile-dev:     at Object.Module._extensions..js (module.js:579:10)
1:39:17 PM diningmanagermobile-dev:     at Module.load (module.js:487:32)
1:39:17 PM diningmanagermobile-dev:     at tryModuleLoad (module.js:446:12)
1:39:17 PM diningmanagermobile-dev:     at Function.Module._load (module.js:438:3)
1:39:17 PM diningmanagermobile-dev:     at Module.require (module.js:497:17)
1:39:17 PM diningmanagermobile-dev:     at module.js:669:12
1:39:17 PM diningmanagermobile-dev:     at Array.forEach (native)

Any ideas what could have changed on the Azure App Service Zip Deploy?

2

Answers


  1. Chosen as BEST ANSWER

    I got it working. The WEBSITE_NODE_DEFAULT_VERSION application setting was set to an older Node version. This worked previously, but I am guessing that the older Node version was no longer available and the ZIPDeploy deployment scripts must be relying on a newer version. I updated it in the app setting and now everything it working with the ZipDeploy.


  2. For anyone who can’t get Tim’s solution to work in a .NET app on a windows-latest pipeline spec. What worked for me was setting the agent spec to windows-2022 instead of windows-latest

    Edit: I can’t speak for other types of applications/specs but from my experience this does not affect deploying to a Linux Container App Service Plan or Azure Funtions

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search