Open History to see the last commit
1---
2id: migrate-from-release-candidate
3title: Migrate from the Release Candidate
4description: Upgrade a TanStack Start release-candidate app to the first stable release, 1.169.
5---
6β
7`@tanstack/react-start` 1.169 is the first stable release of TanStack Start. Upgrading from a release candidate means replacing the removed APIs below and checking the behavior changes that apply to your app.
8β
9## Vite 8
10β
11Start requires Vite 8 when you build with Vite. Upgrade with Vite's [migration guide](https://vite.dev/guide/migration).
12β
13## Removed APIs
14β
15| Removed | Use instead |
16| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17| `@tanstack/nitro-v2-vite-plugin` | `nitro()` from `nitro/vite`. See [Nitro hosting](./guide/hosting#nitro). |
18| `useSession` | A session library such as iron-session. See [Session Management](./guide/authentication#2-session-management). The new library cannot read existing Start session cookies: use a new cookie name and sign users in again, or test a migration that reads the old cookies first. |
19| `.inputValidator()` on server functions and middleware | `.validator()`, which takes the same validator. |
20β
21## Errors
22β
23- A handler returned by `createStartHandler(...)` now rethrows the original error. `createServerEntry` converts errors to responses, and the built-in entry already uses it. In a custom entry, catch inside the `createServerEntry` callback and `return handleStartError(error)` or rethrow. See [Error Handling](./guide/server-entry-point#error-handling).
24- Uncaught errors produce a generic JSON body with a status from `400` to `599` (`500` by default), even if a success status was set before the error. Return a `Response` when an endpoint needs a specific error payload.
25- A server-function call rejects with whatever was thrown, including a `Response` and falsy values such as `undefined`. Return a `Response` to resolve the call with it. See [Raw Responses](./guide/server-functions#raw-responses).
26- Errors thrown by request middleware during a server-function call are sent to the client with their message, and their status is no longer always `500`.
27β
28## Responses
29β
30- Response helpers override the response you return or throw. `setResponseStatus(401)` followed by returning a `200` response sends `401`.
31- `setResponseHeader('set-cookie', cookie)` replaces all outgoing cookies. Use `setCookie` or `appendResponseHeader('set-cookie', cookie)` to add one.
32- `setResponseStatus` ignores codes outside `200`-`599` and warns outside production.
33- Serialized server-function replies never carry `Location`, `Content-Encoding`, or `Content-Length` from helpers, and ignore a helper `204`, `205`, or `304`. Use `redirect()` to redirect.
34β
35## Requests and middleware
36β
37- `getRequestHeader(name)` returns `''` for a header that is present but empty, and `undefined` only when it is missing.
38- A path with invalid percent-encoding, such as `/%E0%A4%A`, gets `400 Bad Request` before your server entry or middleware runs.
39- When no function middleware sends context, `sendContext` is `undefined` instead of `{}`.