Error for deploy NodeJS in Azure App services with xml2json package

Viewed 40

I tried to deploy NodeJS project with xml2json package in Azure Web App Service, but I got error because of python version, how can I solve this problem?

enter image description here

1 Answers

I have tried to reproduce the issue by using the Visual Studio Code to deploy a sample node.js application with the XML2JSON Parser package by using this npm install xml2json --save command in the VS code terminal and installed this package successfully as shown below in the screenshot:

enter image description here

Then tried to publish the app to the Azure App Service by signing into your azure account and Right click--> Create new Web App( Advanced)-->Create a new resource group-->Node.js version-->OS(Windows/Linux)-->location-->App service plan.

Then by expanding the app services in VS code and select your app service add new setting as shown below:

enter image description here

Type this SCM_DO_BUILD_DURING_DEPLOYMENT and set its value to true. enter image description here enter image description here

And select your app service and deploy to web app option-->your app-->done. enter image description here

Your application will be published successfully to the Azure App Service as shown below:

enter image description here

Note: Make sure to use the latest node.js version and In the terminal, ensure you're in your app directory, then start Visual Studio Code with this- code .cmd.

Related