JS Azure Function ServiceUnavailable error
I have built a very simple TS/JS Azure function deployed using Terraform by GitHub Actions and code uploaded az ZIP to the blob connected to the function using WEBSITE_RUN_FROM_PACKAGE.
Now the function app doesn't show any functions under the app with the error
We were not able to load some functions in the list due to errors. Refresh the page to try again. See details
And the details says:
Encountered an error (ServiceUnavailable) from host runtime.
No logs are being logged in Application Insight.
The zip file uploaded on the blob contains:
host.json, package.json, node_modules (--prune ed), dist and here is the content of package.json:
{
"name": "mem",
"version": "1.0.0",
"description": "",
"main": "dist/src/functions/*.js",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"clean": "rimraf dist",
"prestart": "npm run clean && npm run build",
"start": "func start",
"test": "echo \"No tests yet...\""
},
"dependencies": {
"@azure/functions": "^4.0.0"
},
"devDependencies": {
"azure-functions-core-tools": "^4.x",
"@types/node": "18.x",
"typescript": "^4.0.0",
"rimraf": "^5.0.0"
}
}
Where should I start looking for the problem?