TanStackT
TanStack8mo ago
26 replies
brilliant-lime

Updating tanstack router causes crash

Update 1.120.5 -> 1.121.2

I updated the deprecated vite plugin import { TanStackRouterVite } from "@tanstack/router-plugin/vite"; -> import { tanstackRouter } from "@tanstack/router-plugin/vite";

plugin usage:
plugins: [
      tanstackRouter({
        target: "react",
        routeFilePrefix: "~",
        autoCodeSplitting: true,
        routeTreeFileFooter: [
          "export type RouteId = Exclude<keyof FileRoutesById, '__root__'>;",
          "export type Route = FileRoutesById[RouteId];",
          "export type RouteTree = typeof routeTree;",
        ],
      }),
      react(),
      reactScan(),
      //...
]


But both cause crashes on startup:
error when starting dev server:
TypeError: Cannot read properties of undefined (reading 'config')
    at PluginContext.buildStart
Was this page helpful?