Skip to main content

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)
TanStack Start requires Node.js 22.12.0 or higher. Make sure to update your Node.js version before proceeding.

Choose Your Framework

TanStack Start is available for React, Solid, and Vue. Select your framework below:

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.0
  • react-dom >= 18.0.0 or >= 19.0.0
  • vite >= 7.0.0
These should be installed in your project:

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:
Create or update your vite.config.ts:
vite.config.ts

Plugin Order

The plugin order is important:
  1. tanstackStart() - Must come first to transform server functions
  2. viteReact() - React plugin for JSX transformation
  3. nitro() - Server bundling and deployment

TypeScript Configuration

For optimal TypeScript support, configure your tsconfig.json:
tsconfig.json

Package Scripts

Add these scripts to your package.json:
package.json
  • dev: Starts the development server with hot module replacement
  • build: Builds the production application
  • preview: Previews the production build locally
  • start: Runs the production server (after build)

Nitro Installation

TanStack Start uses Nitro for server bundling and deployment. Install it as a dev dependency:
Nitro provides:
  • 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:
You should see version 1.166.1 or higher.

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