Deployment successful but 'No HTTP triggers found'

Leo 0 Reputation points
2024-01-08T13:58:37.8166667+00:00

When trying to deploy my Azure Function to a Function App it says it completes but ends with 'No Http triggers found' and the app is empty.

11:46:35 AM SACSPhotoApp: Starting deployment...
11:46:35 AM SACSPhotoApp: Creating zip package...
11:47:16 AM SACSPhotoApp: Zip package size: 28.5 MB
11:47:18 AM SACSPhotoApp: Updating submodules.
11:47:18 AM SACSPhotoApp: Preparing deployment for commit id 'dbfbc452fe'.
11:47:19 AM SACSPhotoApp: Skipping build. Project type: Run-From-Zip
11:47:19 AM SACSPhotoApp: Skipping post build. Project type: Run-From-Zip
11:47:20 AM SACSPhotoApp: Triggering recycle (preview mode disabled).
11:47:20 AM SACSPhotoApp: Deployment successful.
11:47:27 AM SACSPhotoApp: Started postDeployTask "npm install (functions)".
11:47:37 AM SACSPhotoApp: Syncing triggers...
11:47:42 AM SACSPhotoApp: Querying triggers...
11:47:48 AM SACSPhotoApp: No HTTP triggers found.

The function is a Blob Storage trigger and calls 2 other JS files when run. Both of these files are in the src/functions folder with the Azure Function.

I have followed all of the troubleshooting steps detailed here

https://learn.microsoft.com/en-us/answers/questions/1402890/azure-function-is-not-deployed-from-vs-no-http-tri
but I am still experiencing the same issue.

Please let me know if there's any further info/documents that would help.

Thank you.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,793 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,314 questions
{count} votes

2 answers

Sort by: Most helpful
  1. MikeUrnun 9,772 Reputation points Moderator
    2024-01-10T22:09:20.4133333+00:00

    Hi @Leo - Thanks for confirming the version info which is different between VS Code and the CLI. I suspect that the "No HTTP triggers found" error is occurring because of the missing app settings concerning the versions of Functions runtime as well as the programming model for NodeJS. Take a look at the following support matrix:User's image Assuming that you're choosing the specific versions highlighted in the yellow box in the screenshot above and opting to run your function app on a Windows-based plan on Azure, please add the following and then re-deploy to Azure again:

    • Locally: in your local.settings.json file, verify that the following app setting is present:
    "AzureWebJobsFeatureFlags": "EnableWorkerIndexing" 
    
    • On Azure: navigate to the Environment Variables and verify that the WEBSITE_NODE_DEFAULT_VERSION app setting is present and set to a value of ~20:
      User's image

    After adding the settings above to their respective places, please redeploy again and check if the same error occurs. If you're still hitting the same error despite ensuring the app settings above, please share a screenshot showing all the app settings you have in place and info on the hosting plan SKU that you're deploying to.

    ---Please "Accept Answer" if the answer is helpful so that others in the community may benefit from your experience.


  2. Leo 0 Reputation points
    2024-01-12T12:05:54.5133333+00:00

    It seems this was caused by a conflict between the runtime version of one of the modules i was using in the function (Sharp 64Bit) and the platform settings. I managed to resolve the issue by changing the platform settings of the Function App to 64bit (which matches the version of Sharp installed) and the function now deploys correctly. (Settings > Configuration > General Settings) User's image

    Thanks. Leo


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.