Skip to main content
0 reactions

How to Set Up and Run the Minimal TanStack Start Starter

The starter home page in a browser, with the heading Hello from TanStack Start and the line This app was set up by hand, without the CLI.
The starter home page, right after npm run dev.

You have the source code of the Minimal TanStack Start Starter. This guide takes it from the zip file to the app running on your own computer, then adds your first page.

By the end, the starter’s home page opens in your browser, and a second page opens at /about.

Every command and output on this page is real, run with Node.js 26 and npm 12 on macOS.

Cost: free. Everything runs on your own computer.

Get the Source Code

Get the complete source code of Minimal TanStack Start Starter on Dewiride Store → (opens in a new tab)
The archive holds the starter this guide sets up and runs.

Prerequisites

Check both versions in a terminal:

Bash
node -v
Plain text
v26.13.1
Bash
npm -v
Plain text
12.2.3

Step 1: Unzip the Source Code

Open a terminal in the folder that holds the zip, such as Downloads, and unzip it:

Bash
unzip minimal-tanstack-start-starter-1.0.0.zip
Plain text
Archive:  minimal-tanstack-start-starter-1.0.0.zip
   creating: minimal-tanstack-start-starter
 extracting: minimal-tanstack-start-starter/.gitattributes
 extracting: minimal-tanstack-start-starter/.gitignore
 extracting: minimal-tanstack-start-starter/.nvmrc
  inflating: minimal-tanstack-start-starter/README.md
  inflating: minimal-tanstack-start-starter/package-lock.json
  inflating: minimal-tanstack-start-starter/package.json
   creating: minimal-tanstack-start-starter/src
  inflating: minimal-tanstack-start-starter/src/routeTree.gen.ts
  inflating: minimal-tanstack-start-starter/src/router.tsx
   creating: minimal-tanstack-start-starter/src/routes
  inflating: minimal-tanstack-start-starter/src/routes/__root.tsx
  inflating: minimal-tanstack-start-starter/src/routes/index.tsx
  inflating: minimal-tanstack-start-starter/tsconfig.json
  inflating: minimal-tanstack-start-starter/vite.config.ts

It creates a folder named minimal-tanstack-start-starter. Go into it, because every command from here runs inside it:

Bash
cd minimal-tanstack-start-starter

Step 2: Install the Packages

npm install downloads the packages the starter needs, such as TanStack Start, React and Vite, into a new node_modules folder:

Bash
npm install
Plain text
added 113 packages, and audited 114 packages in 2s

35 packages are looking for funding
  run `npm fund` for details

12 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts   fsevents@2.3.3 (install: (install scripts present))
npm warn install-scripts
npm warn install-scripts Run `npm install-scripts ls` to review, or `npm install-scripts approve <pkg>` to allow.

npm 12 reports vulnerabilities and a blocked install script for fsevents. Part 2’s FAQ explains both, and the starter works without that script.

Step 3: Start the App

npm run dev starts the development server, which shows the app in your browser and reloads it when you change a file:

Bash
npm run dev
Plain text
npm notice run tanstack-start-starter@1.0.0 dev
npm notice run vite dev
Port 3000 is in use, trying another one...

  VITE v8.3.8  ready in 2127 ms

  ➜  Local:   http://localhost:3001/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

Open the address after Local: in your browser. It’s usually http://localhost:3000. Here another app already used port 3000, so Vite, the tool behind the development server, took the next free port, 3001, and said so.

The starter home page in a browser, with the heading Hello from TanStack Start and the line This app was set up by hand, without the CLI.
The starter home page, right after npm run dev.

Keep the terminal open: the app runs only while npm run dev runs. The terminal may also print a warning about a notFoundComponent. Your browser asked for a site icon, favicon.ico, which the starter doesn’t have, so the warning is harmless.

Step 4: Add Your First Page

Every file in src/routes is a page. Create a file named about.tsx in that folder with this code:

src/routes/about.tsxTypeScript
import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/about')({
  component: About,
})

function About() {
  return <h1>About</h1>
}

createFileRoute('/about') gives the page its address, and the About function returns what the page shows.

With npm run dev still running, add /about to the address in your browser, for example http://localhost:3000/about:

A browser showing the new About page of the starter, a single heading that reads About.
The About page, added with one file in src/routes.

TanStack Start added the page to src/routeTree.gen.ts on its own. That file lists every page, and TanStack Start writes it again each time, so leave it as it is.

Stop the App

Press Ctrl+C in the terminal to stop the development server. Run npm run dev again whenever you want to work on the app.

Common Mistakes

MistakeWhat happensDo this instead
Running the commands before cd minimal-tanstack-start-starternpm can’t find package.jsonGo into the folder first, as in Step 1
Editing src/routeTree.gen.tsTanStack Start writes over your changesChange the files in src/routes

Troubleshooting

ProblemFix
npm error enoent Could not read package.jsonYou’re in the wrong folder. Run cd minimal-tanstack-start-starter, then the command again.
Port 3000 is in use, trying another one...Another app uses port 3000. Open the address after Local:, as in Step 3.

FAQ

What does each file do? How to Build a TanStack Start App from Scratch Without the CLI explains every file in the starter, one step at a time.

Do I need the TanStack CLI? No. The starter was set up by hand, so Node.js and npm are all it needs.

Conclusion

Unzip, npm install, npm run dev: the Minimal TanStack Start Starter now runs on your computer, and every file you add to src/routes becomes a page.

Additional Resources

TanStack, React and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by TanStack.

0 comments