Azure / Azure/azure-functions-core-tools

Creating function seems to fail - what is the correct command?

Open
#2,653 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

If I look at the list of typescript templates, I see the `HTTP trigger`.

```bash
npx func templates list
```

![image](https://user-images.githubusercontent.com/41597107/125843133-9a6771c7-7968-4247-9783-57591d3ea0e3.png)

If I try to create a new function with that template name, I get an error:

```bash
npx func new --template "HTTP trigger" --name graphql
```

![image](https://user-images.githubusercontent.com/41597107/125843274-538dd602-d0a6-4408-b7af-036b9def859e.png)

If I walk through the steps via the cli, I find out the number for that template is 10. If I try to use that number, instead of a name, I also get an error.

![image](https://user-images.githubusercontent.com/41597107/125843411-3f3d6589-1b9f-4987-9c8f-45a650ee0364.png)

I don't want to step through the cli choices, I want a single command that answers all the choices - because I'm using this in a doc and don't want the reader to have to step through all the choices either.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `npx func templates list` and the two `npx func new` commands shown. Check the CLI's help and template-selection entry points to determine the accepted noninteractive arguments; done means identifying a single command that creates the TypeScript HTTP-trigger function without prompts and can be used in documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.