How to edit or verify programmin g langauge used in azure functions created locally in VSCode

Gokul R Dev 326 Reputation points
2023-03-07T11:41:29.8+00:00

I am following this tutorial : Audio/Video Calling from a Custom App into a Teams Meeting | Microsoft Cloud Hands-On Tutorials . This tutorial has a repository which contains 2 functions. Since I was not the one who created the fuction I don't know which language is used in this . When I am running the function locally this is what I get :

Can't determine project language from files. Please use one of [--csharp, --javascript, --typescript, --java, --python, --powershell, --custom]

Functions:

        ACSTokenFunction: [GET] http://localhost:7071/api/ACSTokenFunction

        TeamsMeetingFunction: [GET] http://localhost:7071/api/TeamsMeetingFunction

For detailed output, run func with --verbose flag.
[2023-03-07T11:37:23.175Z] Worker process started and initialized.
[2023-03-07T11:37:26.689Z] Host lock lease acquired by instance ID '00000000000000000000000088A69A98'.


Does my function is actually running now, but it doesn't created the teams meeting link which is what I am looking for
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,487 questions
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,372 questions
Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
740 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,963 questions
{count} votes

Accepted answer
  1. Mike Urnun 9,776 Reputation points Microsoft Employee
    2023-03-08T07:02:32.6166667+00:00

    Hello @Gokul R Dev I've had a chance to look a little deeper & resolved the particular issue you're hitting but still haven't run through the entire tutorial. So here goes:

    • I was able to reproduce the issue you're having by cloning the down the specific parts of the tutorial that concern the Functions which you're having the problem with from here: https://github.com/microsoft/MicrosoftCloud/tree/main/samples/acs-to-teams-meeting
    • I assume that you've done similar steps and are working with the same code files. The Functions code downloaded is missing the local.settings.json file. You'll need to create this file and add the configuration values in json format. This file is required for running Function App locally & contains some important configuration values such as language runtime, and connection to storage. For more on this file, please review the following doc: https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-local#local-settings-file
    • The Functions in the tutorial were written in Typescript and the corresponding setting (which is missing) should be FUNCTIONS_WORKER_RUNTIME set to node.
    • Azure Functions requires a storage solution for starting & running and in local environments, we use Azurite. So make sure you have it installed & started before you run your Function Apps. I recommend installing the VSCode extension for Azurite which is super easy to use.

    With the above in place, the complete local.settings.json file that worked for me for successfully running the tutorial code is as follows:

    {
      "IsEncrypted": false,
      "Values": {
        "FUNCTIONS_WORKER_RUNTIME": "node",
        "AzureWebJobsStorage": "UseDevelopmentStorage=true"
      },
      "Host": {
        "LocalHttpPort": 7071,
        "CORS": "*",
        "CORSCredentials": false
      }
    }
    
    

    I created local.setting.json file alongside the other files in VSCode:

    User's image

    Screenshot of the running functions:
    User's image

    I hope this answer is helpful and you're able to get unblocked to proceed to the next steps of the tutorial. If you continue to encounter problems, let me know in the comments and I'd happy to help!

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Bruno Lucas 4,421 Reputation points MVP
    2023-03-08T04:23:11.9566667+00:00

    Hi Gokul

    This is not plain JavaScript. It uses React:

    User's image

    Look like the tutorial just ask to build, so this may help: https://www.npmjs.com/package/build-react-npm

    But if you plan to change or maintain you need to know React

    1 person found this answer helpful.