When I run func new the options only list C# and JavaScript. F# should be on the list
When I run func new --language F# --template HttpTrigger --name MyHttpTrigger the following error is reported:
Can't find template "HttpTrigger" in "F#"
Are you on core version/branch?
I installed it from the npm package as per the the README. Should I build from source using the core branch?
I asked because when I install the master branch of the tool (npm i -g azure-functions-core-tools), I get lots of templates including F#.
If I install cross-platform beta version (npm i -g azure-functions-core-tools@core), I only get JS and C# templates.
my apologies (I was on my phone an it autocorrected npm to mom. I have fixed that). I'm on my computer now. AFAIK I used the standard installation ie npm i -g azure-functions-core-tools. I will update my installation now and check. I could have done something wrong.
Ok, so you are on cross-platform version which is now in beta. I guess they did not bother with adding more templates yet.
I've created #305 earlier today, so it's almost the same question.
If i try to install with the npm command i get the following error:
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for [email protected]: wanted {"os":"win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
npm ERR! notsup Valid OS: win32
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: darwin
npm ERR! notsup Actual Arch: x64
Thanks for raising the new issue.
This is where is found I found the installation steps with hose I installed the tool:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local
You were correct, I did install using with npm i -g azure-functions-core-tools@core
I also noticed that the README for this project still states that this tool is windows only, while the microsoft docs state that cross-platform support is in beta. Should a seperate issue be raised to update README for this repo?
Does this mean Azure Functions Core Tools (2.0.1-beta.31) on macos doesn't work for F#?
@slifin It should work, but it has no templates for F#, so you'd have to setup the project manually
oh right, is there any documentation for that? This is my first foray into F# so I don't know what's involved with setting up a project manually
I have a F# template in the azure function cloud, can I copy all the files from that into my local dir where I did func new?
@slifin Shameless plug to my blog and samples repo:
https://mikhail.io/2017/12/precompiled-azure-functions-in-fsharp/
https://github.com/mikhailshilkov/azure-functions-fsharp-examples
@jeffhollan are there any plans to add F# templates?
cc/ @soninaren, as the PR has already been merged
Most helpful comment
@slifin Shameless plug to my blog and samples repo:
https://mikhail.io/2017/12/precompiled-azure-functions-in-fsharp/
https://github.com/mikhailshilkov/azure-functions-fsharp-examples