-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Which project does this relate to?
Router
Describe the bug
Claude generated the summary below. It does indeed look like seroval just merged a large project refactor
Problem Statement
TanStack Router (v1.136.x and earlier) declares dependencies on incompatible
versions of seroval and seroval-plugins:
"@tanstack/router-core@1.136.17": {
"dependencies": {
"seroval": "^1.3.2",
"seroval-plugins": "^1.3.2"
}
} This causes a critical SSR failure when the environment resolves to seroval
v1.4.0 (which may happen due to other dependencies or monorepo setups):
Error: ctx.createEffectfulFunction is not a function
at web.mjs:32
at processTicksAndRejection (async :...)
Error: Unable to enqueue response (SSR streaming failed)
Root Cause
seroval v1.4.0 is incompatible with seroval-plugins v1.3.x:
- seroval v1.4.0 removed or renamed the createEffectfulFunction API
- seroval-plugins v1.3.x was built against seroval v1.3.x and still calls
ctx.createEffectfulFunction() - When both versions coexist in the dependency tree (e.g., due to other
packages requiring seroval v1.4.0), the older plugins try to call a method that
no longer exists
Why This Happens:
- Other dependencies in the ecosystem may declare seroval@^1.4.0
- Monorepo setups or overrides may force a newer seroval version
- TanStack Router's pinned v1.3.2 constraint doesn't prevent newer versions from
being installed alongside it - The older seroval-plugins v1.3.x then fails at runtime
Impact
- Blocking Issue: SSR breaks completely when seroval v1.4.0 is present in the
dependency tree - Cascading Failures: Data serialization fails during SSR streaming, affecting
all routes - No User Workaround Available: Users cannot fix this without package.json
overrides (not all package managers support this)
Affected Versions
- TanStack Router: v1.136.x and earlier
- TanStack Start: v1.136.x and earlier
- seroval: v1.4.0+
- seroval-plugins: v1.3.x
- Environments: Any project using TanStack Start with SSR where seroval v1.4.0+
is present
Reproduction
In a monorepo or project where seroval v1.4.0 is declared:
- Install @tanstack/react-start@latest (which depends on TanStack Router
v1.136.x) - Ensure seroval v1.4.0 is present in node_modules (via direct dependency or
other packages) - Run SSR (dev or build)
- Observe: "ctx.createEffectfulFunction is not a function" error during
serialization
Solution
Update TanStack Router packages to support seroval v1.4.0+:
Update the dependency declarations in:
- @tanstack/router-core
- @tanstack/start-client-core
- @tanstack/start-server-core
From:
{
"dependencies": {
"seroval": "^1.3.2",
"seroval-plugins": "^1.3.2"
}
} To:
{
"dependencies": {
"seroval": "^1.4.0",
"seroval-plugins": "^1.4.0"
}
} Or (if backward compatibility with v1.3.x is desired):
{
"dependencies": {
"seroval": "^1.3.2 || ^1.4.0",
"seroval-plugins": "^1.3.2 || ^1.4.0"
}
} Implementation Notes
-
seroval v1.4.0+ should be compatible with existing TanStack Router SSR code
(seroval maintains backward compatibility in the public plugin API) -
seroval-plugins v1.4.0 was specifically built to work with seroval v1.4.0
-
This change should be released as a patch version (e.g., 1.136.18) with
appropriate testing -
Affected packages: @tanstack/router-core, @tanstack/start-client-core,
@tanstack/start-server-core
Your Example Website or App
see above
Steps to Reproduce the Bug or Issue
See above
Expected behavior
see above
Screenshots or Videos
No response
Platform
- Router / Start Version: [e.g. 1.121.0]
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Browser Version: [e.g. 91.1]
- Bundler: [e.g. vite]
- Bundler Version: [e.g. 7.0.0]
Additional context
No response