TanStackT
TanStack7mo ago
5 replies
ripe-gray

[TanStack Router] SSR import error

Hey! I'm trying to implement SSR using the TanStack Router following this guide:
https://tanstack.com/router/latest/docs/framework/react/guide/ssr

However, I'm running into an import error right at the start:

import {
  createRequestHandler,
  renderRouterToString,
  RouterServer,
} from '@tanstack/react-router/ssr/server'


And the error I'm getting is:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './ssr/server' is not defined by "exports" in /node_modules/@tanstack/router-core/package.json imported from /node_modules/@tanstack/react-router/dist/esm/ssr/server.js

Just wanted to confirm: is @tanstack/react-router/ssr/server still a valid import path in the latest version? Or has it moved/been changed?


I'm using the latest version of @tanstack/react-router. "@tanstack/react-router": "^1.127.3",

Thanks in advance!
[!WARNING] While every effort has been made to separate these APIs from changes to Tanstack Start, there are underlying shared implementations internally. Therefore these can be subject to change and...
SSR | TanStack Router React Docs
Was this page helpful?