Replies: 1 comment
-
|
this has actually been fixed as of today. here's what happened: the backstorywhen vite first added tanstack router as a template option (PR #19573, march 2025), meanwhile, tanstack consolidated all their CLI scaffolding tools into a single package: so when you ran the fixvite fixed this in PR #21527 (merged feb 2, 2026). the // old
'npm create -- tsrouter-app@latest TARGET_DIR --framework react --interactive'
// new
'npm exec @tanstack/cli@latest -- create TARGET_DIR --template file-router --interactive'this shipped in what to do nowoption 1: just update create-vite and try again npm create vite@latest(if you're on the latest npm, it'll pull option 2: skip create-vite entirely and use the tanstack CLI directly # router-only SPA (vite, no SSR)
npx @tanstack/cli create my-app --router-only
# full tanstack start app (with SSR)
npx @tanstack/cli create my-appthe quick reference for
|
| command | what it does |
|---|---|
npx @tanstack/cli create my-app |
full-stack tanstack start app (SSR) |
npx @tanstack/cli create my-app --router-only |
client-only SPA with vite |
npx @tanstack/cli create my-app --add-ons clerk,drizzle |
with add-ons |
npx @tanstack/cli add clerk drizzle |
add features to existing project |
npx @tanstack/cli create --list-add-ons |
see all available add-ons |
links
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently tried to set up a new React project using Vite and TanStack Router. I followed some tutorials and ran:
npm create vite@latestWarning: create-tsrouter-app is deprecated. Use "tanstack create --router-only" or "npx @tanstack/cli create --router-only" instead.
See: https://tanstack.com/router/latest/docs/framework/react/quick-start
My problem :
I am not sure how to properly integrate TanStack Router with a Vite project after this deprecation.
Should I start a new project using npx @tanstack/cli create --router-only instead of Vite, or can I still use Vite and add TanStack Router manually?
I would appreciate guidance or examples for setting up a new project that works with the latest TanStack Router.
if it vite problem there is scope of improvement
Thanks in advance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions