Prerequisites
Before installing TanStack Start, ensure you have:- Node.js: Version 22.12.0 or higher
- Package Manager: npm, yarn, or pnpm
- Vite: Version 7.0.0 or higher (installed automatically)
Choose Your Framework
TanStack Start is available for React, Solid, and Vue. Select your framework below:- React
- Solid
- Vue
React Installation
Install TanStack Start for React along with its peer dependencies:Peer Dependencies
TanStack Start for React requires:react>= 18.0.0 or >= 19.0.0react-dom>= 18.0.0 or >= 19.0.0vite>= 7.0.0
Development Dependencies
For TypeScript support and optimal development experience:Optional: Router Devtools
For debugging and inspecting your router state:Vite Configuration
After installing the packages, configure Vite to use the TanStack Start plugin:- React
- Solid
- Vue
Create or update your
vite.config.ts:vite.config.ts
Plugin Order
The plugin order is important:tanstackStart()- Must come first to transform server functionsviteReact()- React plugin for JSX transformationnitro()- Server bundling and deployment
TypeScript Configuration
For optimal TypeScript support, configure yourtsconfig.json:
- React
- Solid
- Vue
tsconfig.json
Package Scripts
Add these scripts to yourpackage.json:
package.json
dev: Starts the development server with hot module replacementbuild: Builds the production applicationpreview: Previews the production build locallystart: Runs the production server (after build)
Nitro Installation
TanStack Start uses Nitro for server bundling and deployment. Install it as a dev dependency:- Universal deployment adapters
- Auto-detected platform configuration
- Production-optimized server builds
- Support for serverless and edge runtimes
Directory Structure
Create the following directory structure for your project:Verification
Verify your installation by checking the installed versions:Next Steps
Quickstart Tutorial
Build your first TanStack Start application with server functions
Server Functions
Learn how to create and use server functions
SSR Setup
Configure server-side rendering for your app
Deployment
Deploy your application to production