Azure / Azure/webapps-deploy

util_1.promisify is not a function

Open
#422 8 comments 2 reactions 0 assignees View on GitHub
need-to-triage
Dominant language
TypeScript
Stars
338
Forks
234
Avg merge
53m
Merged PRs (30d)
3

Description

I am trying to deploy .net core Web Api (.net 6) to Azure web app but I am getting an error
"**_C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43
exports.statAsync = util_1.promisify(fs.stat);_**"

the same workflow was working fine till last working day, but all of a sudden it is throwing exception

**_Log from last working day:_**
Generate deployment script was success full with script:

Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "C:\local\Temp\zipdeploy\extracted" -o "C:\home\site\deployments\tools" --basic --sitePath "C:\local\Temp\zipdeploy\extracted"').

But now getting an error related to Node.js.

### Yaml File:

- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: webapp

- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.FredApiAppService_0F0E }}
package: '.'

### Error:

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"'.
C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43
exports.statAsync = util_1.promisify(fs.stat);
^

TypeError: util_1.promisify is not a function
at Object. (C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43:28)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\InternalAzureLogger.js:48:24)
at Module._compile (module.js:577:32)
C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43\r\nexports.statAsync = util_1.promisify(fs.stat);\r\n ^\r\n\r\nTypeError: util_1.promisify is not a function\r\n at Object. (C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\FileSystemHelper.js:43:28)\r\n at Module._compile (module.js:577:32)\r\n at Object.Module._extensions..js (module.js:586:10)\r\n at Module.load (module.js:494:32)\r\n at tryModuleLoad (module.js:453:12)\r\n at Function.Module._load (module.js:445:3)\r\n at Module.require (module.js:504:17)\r\n at require (internal/module.js:20:19)\r\n at Object. (C:\PROGRA~2\SITEEX~1\NODEAP~1\210~1.4\nodejs\node_modules\applicationinsights\out\Library\InternalAzureLogger.js:48:24)\r\n at Module._compile (module.js:577:32)\r\nC:\Program Files (x86)\SiteExtensions\Kudu\102.10502.001\bin\Scripts\starter.cmd "C:\Program Files (x86)\SiteExtensions\Kudu\102.10502.001\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"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.