0

I am building a Static Web App using Node functions for an API. Everything works when deployed to Azure, but I cannot run locally on Mac. I am able to run locally on Windows. I am using the new v4 programming model, using this pattern:

app.http('my-cool-func', {
    route: "my/cool/route",
    methods: ['GET'],
    authLevel: 'anonymous',
    handler: async (request: HttpRequest): Promise<HttpResponseInit> => {
        ...
    }
});

On Windows, when I punch in:

func --version

I get: 4.0.5441. When I kick off my /api folder directly with func start, it identifies the functions correctly and all is well.

On Mac, when I ask for the func version, I get 4.0.3971. I installed it using brew (following these directions):

brew tap azure/functions
brew install azure-functions-core-tools@4

However, according to this guide, which also provides the exact same installation instructions:

Make sure you install version v4.0.5382 of the Core Tools, or a later version.

This note is only present when that article is set to v4 mode; it disappears when setting it to v3 mode. One presumes that some glitch has been fixed between here and there, and that the glitch is relevant only for v4-mode implementations. Perhaps something to do with detecting the presence of functions?

Anyway, upon kicking off the same /api folder with func start on the Mac, I receive the unfortunately familiar message:

No job functions found. Try making your job classes and methods public. If you're using binding extensions ... etc.

Is there an updated version of the Azure Functions Core Tools I can get my hands on for Mac? How can I install it, if not using brew?

1 Answer 1

1

This is likely due to the v4 Programming Model like you suspected. Based on this table, you need a host runtime of at least 4.25 which is available in version 4.0.5357 of Azure Functions Core Tools onwards.

I don't have a mac to try out the homebrew install but you should be able to download a newer release from the releases pages directly for now.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! I was able to get my hands on the zip file, but extracting it and running it is giving me problems. First, I was able to make func executable with a chmod command, but then I started getting all kinds of grief like '/Users/me/tools/Azure.Functions.Cli.osx-x64.4.0.5455/libcoreclr.dylib' not valid for use in process: library load disallowed by system policy) which when researched has to do with code signing? ugh. Any advice on installing this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.