ApplicationInsights-node.js
ApplicationInsights-node.js copied to clipboard
'Generating Deployment Script' step consistently failing during Zip Push Deploy - applicationinsights node module exception
Cross posting from 'Generating Deployment Script' step consistently failing during Zip Push Deploy - applicationinsights node module exception
Repro steps.
Our project consistently builds on our local dev machine, and even when we attempt to deploy a zip file that was previously deployed successfully (and currently running in the deployed build), this error still reproduces.
We usually use Zip Push Deploy via the Kudu API, but have also attempted using the Kudu UI and encountered the same issue. The issue still reproduces after starting the web app.
The log/error given by the failure.
After the deployment step 'Generating Deployment Script' we get the following error:
2022-07-19T21:39:58.0694341Z : Using the following command to generate deployment script: 'azure site deploymentscript -y --no-dot-deployment -r "D:\local\Temp\zipdeploy\extracted" -o "D:\home\site\deployments\tools" --basic --sitePath "D:\local\Temp\zipdeploy\extracted"'.
2022-07-19T21:40:01.6167091Z : D:\PROGRA2<redacted>\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43
2022-07-19T21:40:01.6167091Z : exports.statAsync = util_1.promisify(fs.stat);
2022-07-19T21:40:01.6319568Z : ^
2022-07-19T21:40:01.6475574Z :
2022-07-19T21:40:01.6475574Z : TypeError: util_1.promisify is not a function
2022-07-19T21:40:01.6631792Z : at Object.
Mention any other details that might be useful.
Kudu Version: 97.40427.5713
NathanBlaise-MSFT filed the original issue. This is blocking a lot of customers who deploy via ZipDeploy to a site that has this Node Application Insights agent installed.
I'm encountering this same error within an ASP.NET 8.0 Blazor Web Assembly app that I'm using a GitHub Action to build and deploy. Is there any update on when this will be resolved?
@dougholland Have you tried removing the app service environment variable XDT_MicrosoftApplicationInsights_NodeJS
? It was added automatically in my environment.
This resolved the error for me in a pure ASP.NET8 Blazor Web app. Worth a shot.