lifecycle/migrate-from-nextjs

Migrate a Next.js App Router application to TanStack Start.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/guillempuche/engranatge --skill lifecycle-migrate-from-nextjs-guillempuche
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lifecycle/migrate-from-nextjs
Source: https://github.com/guillempuche/engranatge/tree/main/docs/repos/tanstack-router/packages/react-start/skills/lifecycle/migrate-from-nextjs
Command: npx skills add https://github.com/guillempuche/engranatge --skill lifecycle-migrate-from-nextjs-guillempuche

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It provides a step‑by‑step migration guide for developers who want to replace Next.js App Router with TanStack Start, eliminating the need to rewrite routing, server functions, and build configuration manually.

Core Features & Use Cases

  • Checklist‑driven workflow: A complete checklist covering branch creation, package installation, and removal of Next.js.
  • Route conversion mappings: Direct mapping tables for pages, layouts, dynamic routes, and API routes.
  • Server function transformation: Guidance on replacing Next.js Server Actions with createServerFn.
  • Build and middleware migration: Instructions to switch from next.config.js to Vite with TanStack Start plugins and to implement middleware.
  • Common pitfalls: Alerts about retaining Next.js directives and parameter interpolation errors.

Quick Start

Follow the migration checklist to convert your Next.js project to TanStack Start.

Frequently Asked Questions about lifecycle/migrate-from-nextjs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Next.js App Router to TanStack Start?

Migrating from Next.js App Router to TanStack Start involves a checklist-driven workflow that replaces Next.js routing with isomorphic routing, server functions, and Vite-based builds. It provides direct mapping tables for pages, layouts, and dynamic routes.

What is the best way to replace Next.js Server Actions with TanStack Start?

The best way to replace Next.js Server Actions with TanStack Start is by using the `createServerFn` function. This server function transformation guidance ensures your backend interactions remain functional during the Vite-based build migration.

How do I switch from next.config.js to Vite when migrating to TanStack Start?

Switching from next.config.js to Vite requires configuring Vite with TanStack Start plugins. The migration process provides specific instructions for replacing Next.js build configuration and implementing middleware within the Vite environment.

Can I migrate dynamic routes and API routes from Next.js to TanStack Start?

Yes, you can migrate dynamic routes and API routes from Next.js to TanStack Start. The migration guide includes direct route conversion mappings that map your existing Next.js pages, layouts, and API routes to TanStack Router equivalents.

What are common pitfalls when migrating a Next.js project to TanStack Start?

Common pitfalls when migrating a Next.js project to TanStack Start include retaining Next.js directives and encountering parameter interpolation errors. The migration guide alerts you to these specific issues to prevent them during route and server function conversion.

Do I need Node and npm to migrate my Next.js application to TanStack Start?

Yes, migrating a Next.js application to TanStack Start requires Node and npm to install the @tanstack/react-start and @tanstack/react-router packages. These dependencies enable the isomorphic routing and server functions needed for the Vite-based build.