Windows Azure App Service NodeJS Version
Published Feb 01 2022 05:20 PM 5,464 Views
Microsoft

We recently received some feedback regarding to Windows Azure App Service Node version change, so I would like to write this article to clarify what happened and what is the best practice. 

 

What is the discussion scope of this article? 

  • This article only discuss the Windows Azure App Service, Linux App Service is out of scope of this article. 

 

What happened? 

  • The Windows Azure App Service platform removed some minor NodeJS version. That could result in some un-expected result if the App Service's configuration is not right. 

 

Is that removement is expected behavior? 

  • Yes.
  • Azure App Service is a PaaS service, and the platform will manage the Windows Node version.
  • The App Service Platform periodically refreshes the node version, and only keeps the latest two minor versions, and removal of older build versions are by design.

 

What is the best practice? 

  1. You can always check the current Supported Node details version here (replace the blue part with your App Service name):

             https://$YourAppServiceName.scm.azurewebsites.net/api/diagnostics/runtime 

            Boqian_0-1643764720623.png

 

     2. Please do not hard code the Node minor version. As a bad example:                  

         Boqian_1-1643764720619.png

 

You should use the settings like this:

          Set app setting WEBSITE_NODE_DEFAULT_VERSION=~14

If the website need some specified settings in the configure file. e.g. there is a subfolder under this website may need specified node version, you can set the NodePath like that:

          In the config NodePath=C:\program file\nodejs\%WEBSITE_NODE_DEFAULT_VERSION%\node.exe

      3. If the website application only works well in some specified NodeJS version, e.g. 14.15.1. Firstly, it is not the best practice, we should make sure the application can work well in the recent latest version. Because the later version will include some benefits, e.g. more security, fix bug on previous version.  If there is some hard limitation with the application, and there is no easy way to make it work on the recent latest version, you can considering uploading your own NodeJS under the /home/site directory. Then you can configure your website to use this as the Node path. And the platform upgrade will not influence this App Service Node Version.

Co-Authors
Version history
Last update:
‎Feb 01 2022 05:20 PM
Updated by: