skip to Main Content

I am trying to deploy an Azure function through Visual Code Studio. I have created an app and now I want to create a time trigger function.

However when I am trying to deploy the function, It requires to start debugging:

enter image description here

When I debug it throws an error saying that the command "func" is not recognized and invites me to open the launch.json file:

enter image description here

error:

func : Le terme «func» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou 
programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin    
d'accès est correct et réessayez.
Au caractère Ligne:1 : 1
+ func host start
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (func:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

deploy an azure function with visual studio code

2

Answers


  1. Chosen as BEST ANSWER

    I have solved the issue. It had to do with my python interpreter. I had python 3.12.4 installed. Somehow azure function requiered a lower version as you can see here : enter image description here

    So I downloaded python 3.9 configured a virtual environment with python 3.9 as an interpreter and it solved it. I also had installed node.js not sure if it helped resolving the issue or not


  2. Make sure you have installed the AZURE FUNCTION CORE TOOLS PACKAGE and Update the package. restart you VSCOde and try to run it, if this doesnt work, download the package from web and install it mannually.
    AZURE FUNCTIONS TOOL

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search