Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util_1.promisify is not a function #422

Open
RashmiBK5 opened this issue May 15, 2024 · 4 comments
Open

util_1.promisify is not a function #422

RashmiBK5 opened this issue May 15, 2024 · 4 comments

Comments

@RashmiBK5
Copy link

I am trying to deploy .net core Web Api (.net 6) to Azure web app but I am getting an error
"C:\PROGRA2\SITEEX1\NODEAP1\2101.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:\PROGRA2\SITEEX1\NODEAP1\2101.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:\PROGRA2\SITEEX1\NODEAP1\2101.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:\PROGRA2\SITEEX1\NODEAP1\2101.4\nodejs\node_modules\applicationinsights\out\Library\InternalAzureLogger.js:48:24)
at Module._compile (module.js:577:32)
C:\PROGRA2\SITEEX1\NODEAP1\2101.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:\PROGRA2\SITEEX1\NODEAP1\2101.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:\PROGRA2\SITEEX1\NODEAP1\2101.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"

@AndyEdmonds
Copy link

I'm getting exactly the same error trying to deploy several webapps.

@RashmiBK5
Copy link
Author

Hi @AndyEdmonds
I added WEBSITE_NODE_DEFAULT_VERSION =14.17.0 in Web app environment setting and it started working.

@AndyEdmonds
Copy link

Hi Rashmi, Thanks, will try it.

@casepulvec
Copy link

Hi @RashmiBK5
Thank you so much for your reply. I had the same issue for several days when trying to deploy a bot from Bot Framework Composer to App Services App and Azure Bot Services. Setting the environment variable WEBSITE_NODE_DEFAULT_VERSION as 14.17.0, allow me to finally deploy the app.

For future reference, if someone else has the same issue when deploying an app from Bot Framework Composer, the following are the errors I was able to solve by following Rashmi's recommendations.
Error from Bot Framework Composer
thumbnail_image

Error log in App Services
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants