I’m having real trouble getting some basic Typescript functions deployed to Azure. I deployed using VS code, and the deployment was successful according to the Output window, but when I look at the Function App in the Azure Portal, there are no functions listed:
Also no functions appear in the Azure tab in VS code:
I checked my project structure and it mirrors what is suggested in the Typescript developer guide:
<project_root>/
| - .vscode/
| - dist/
| | - src/
| | | - functions/
| | | | - myFirstFunction.js
| | | | - myFirstFunction.js.map
| | | | - mySecondFunction.js
| | | | - mySecondFunction.js.map
| - node_modules/
| - src/
| | - functions/
| | | - myFirstFunction.ts
| | | - mySecondFunction.ts
| - .funcignore
| - host.json
| - local.settings.json
| - package.json
| - tsconfig.json
I checked that AzureWebJobsFeatureFlags
is set to EnableWorkerIndexing
, as someone suggested that in a different SO post. The Typescript files are being successfully compiled during deployment and appear in dist > src > functions.
I also tried deploying using the Core Tools. Again, the deployment was successful. It said that the zip package was uploaded, but no functions appear.
What am I missing here?
2
Answers
You are missing the function.json file for your functions.
Should look something like this.
I agree with @Gagan Bajwa. Every function has an individual function. Json.
I created HTTP trigger functions with two function in typescript runtime stack.
Function1 host.json:
Function2 host.json:
I have given the scriptFile path in the function. Json.
Below is the folder structure and the status of running my code:
deployment status:
Output:
I am able to see the functions in the Azure portal where I was deployed.