Skip to content

tanstack.com/builder exports broken CLI command for start add-on #299

@tonismonis

Description

@tonismonis

Which project does this relate to?

Create Tanstack App

Describe the bug

first ever FOSS bug report so go easy on me lol

Bug

CLI command exported from tanstack.com/builder fails:

npx create-tanstack-app@latest my-app --add-ons form,shadcn,table,start,tanstack-query

Error: Add-on start not found

Suspected Cause

1. start add-on only supports file-router mode
2. CLI defaults to code-router when --template not specified
3. Add-ons filtered by mode before lookup → start removed → "not found"

Workaround

downloaded the repo and used claude to find a workaround.
suggested the following:

npx create-tanstack-app@latest my-app --template file-router --add-ons start

and it worked!


I believe the culprit is this block at packages/cta-cli/src/command-line.ts:56-58

```typescript
let mode: string =
  forcedMode ||
  (cliOptions.template === 'file-router' ? 'file-router' : 'code-router')

that sets the default to code router when template is not passed, which is the case for the tanstack builder cli export thingy.

which strikes me as weird since the docs recommend file router as a default.

Your Example Website or App

tanstack.com/builder

Steps to Reproduce the Bug or Issue

go to tanstack.com/builder
select the dashboard template
export it via cli
paste the cli command into your terminal.

add --template file-router to the command for it to work.

Expected behavior

should bootstrap the template, but instead fails with "Add-on start not found" message

Screenshots or Videos

Image

Platform

  • OS: macOS 14.2

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions