Skip to content

fix: error starting project with TanStack Router template#20184

Merged
patak-cat merged 1 commit intovitejs:mainfrom
standingdreams:fix/create-tsrouter-app-fix
Jun 10, 2025
Merged

fix: error starting project with TanStack Router template#20184
patak-cat merged 1 commit intovitejs:mainfrom
standingdreams:fix/create-tsrouter-app-fix

Conversation

@standingdreams
Copy link
Copy Markdown
Contributor

Description

When running pnpm create vite and selecting the TanStack Router variant, an error is thrown.

Reproduction Steps

  1. Create a new Vite project by running npx create vite or pnpm create vite
  2. Select React as the framework
  3. Select TanStack Router as the variant and see the error displays:
error: option '--framework <type>' argument 'react' is invalid. Invalid framework: react. Only the following are allowed: React, Solid

image

Root Cause

The framework arguments for TanStack Router are case sensitive. There is a recent update that changes react to React.

Solution

Update the custom command for TanStack Router to npm create -- tsrouter-app@latest TARGET_DIR --framework React --interactive

The framework names for `create-tsrouter-app` are case sensitive. Updates the TanStack Router custom command to use the correct casing for the React framework name in the command.
Copy link
Copy Markdown
Member

@patak-cat patak-cat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@patak-cat patak-cat merged commit 44bd3eb into vitejs:main Jun 10, 2025
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants