Unable to complete the exercise of Create Serverless application, Unit 5 of 6

29616528 11 Reputation points
2021-08-06T10:50:05.77+00:00

Docs Learn Browse Create serverless applications Develop, test, and publish Azure Functions by using Azure Functions Core Tools Exercise - Publish a function to Azure by using the Core Tools.

Unit 5 of 6

Hi,

I am just unable to proceed further, as I just struck upon this exercise. I just followed exactly step by step, still it says its not correct. Can someone guide me? I really need help.

Thanks,
Ravinder

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

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 26,706 Reputation points Microsoft Employee
    2021-08-09T20:40:47.117+00:00

    Hello @29616528 ,
    Apologies for the delayed response here. I went through the tutorial and was able to execute the tutorial. Following were the issues which I came across.

    • In Unit 5 "Create function app" step when you run the command
      az functionapp create \  
        --resource-group "$RESOURCEGROUP" \  
        --name "$FUNCTIONAPP" \  
        --storage-account "$STORAGEACCT" \  
        --runtime node \  
        --consumption-plan-location centralus \  
        --functions-version 2  
      

    I got the error as shown below

    121617-image.png

    I changed the --functions-version to version 3 and was able to execute the command.

        az functionapp create \  
          --resource-group "$RESOURCEGROUP" \  
          --name "$FUNCTIONAPP" \  
          --storage-account "$STORAGEACCT" \  
          --runtime node \  
          --consumption-plan-location centralus \  
          --functions-version 3  
    
    • In Unit 5 after you publish your function app to Azure, I was getting 502 exceptions. 121773-image.png

    This error was due to the wrong Node Version you can run the command below to change it.

    az functionapp config appsettings set --name $FUNCTIONAPP --resource-group $RESOURCEGROUP --settings "WEBSITE_NODE_DEFAULT_VERSION=~10"  
    

    After this I was able to execute the tutorial successfully.

    121791-image.png

    Please let me know if you are facing any other errors while executing the tutorial. I have created a feedback item to rectify the issues above in the learning module.

    Please let me know if there are any concerns. Thank you!

    2 people found this answer helpful.

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.