TimeTrigger Azure Function gives No Module Error in Azure Portal but runs well in VSC

The function on azure cloud will install the modules according to the requirements.txt. So when you deploy the function from local to azure portal, the modules which installed on local will not also be installed on azure cloud if you didn’t add the modules to requirements.txt. You can run the command below to add all of the modules into requirements.txt automatically:

pip freeze > requirements.txt

And then run func azure functionapp publish <funciton app name on azure> --build remote to deploy the function from local to azure.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top