How to determine current Node.js version in Azure Function App?

Dave Willard 46 Reputation points
2023-06-06T19:54:09.36+00:00

How to determine current Node.js version in Azure Function App?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,910 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2023-06-06T20:35:20.63+00:00

    Hello Dave,

    Try the following suggestions found on:

    module.exports = async function (context, req) {
        context.log('JavaScript HTTP trigger function processed a request.')
    
        context.res = {
            body: `Node version: ${process.version}`
        }
    }
    

    https://www.maxivanov.io/change-nodejs-version-in-azure-functions/#:~:text=Azure%20Portal,-As%20of%20February&text=From%20your%20App%20Function%20page,change%20the%20version%2C%20then%20Save.


    If this is helpful please accept answer.

    0 comments No comments

  2. Pramod Valavala 20,656 Reputation points Microsoft Employee Moderator
    2023-06-06T20:59:09.8466667+00:00

    @Dave Willard This setting is only applicable to windows function apps.

    If you are linux, it is a site setting that you can view by going to the JSON View like so
    User's image

    and to change it run the following command using Azure CLI as shown in the docs here.

    az functionapp config set --linux-fx-version "node|18" --name "<MY_APP_NAME>" --resource-group "<MY_RESOURCE_GROUP_NAME>"
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.