Start SSR bundle calls createServerFn before initialization with pnpm symlinked layout
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript, vite
- Área
- backend, build-system
Línea de trabajo
Comienza con el reproductor mínimo y compara las instalaciones symlinked y hoisted usando los comandos pnpm build y preview indicados. Inspecciona src/schema.ts y su importación en src/data.ts; después, sigue la compilación intermedia de Vite de Nitro hasta .output/server/_ssr/ssr.mjs. Se considera completado cuando el layout symlinked sirve HTTP 200 sin llamar a createServerFn antes de la inicialización, o cuando la compilación informa de un fallo claro.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which project does this relate to?
Start
Describe the bug
A small TanStack Start SSR app builds successfully but returns HTTP 500 on every
request when installed with pnpm's default symlinked node_modules layout. The
emitted .output/server/_ssr/ssr.mjs invokes createServerFn before its
assignment:
TypeError: createServerFn is not a function
at .output/server/_ssr/ssr.mjs:40:18
The same source and exact dependency versions return HTTP 200 when installed
with a hoisted layout. The trigger is importing a Drizzle pgTable schema into
the server-function/query graph. Removing that schema import also makes the
symlinked build work.
The divergence begins in Nitro's intermediate Vite build:
| Install | Layout | HTTP | Intermediate SSR entry | Final ssr.mjs |
|---|---|---|---|---|
pnpm install |
symlinked | 500 | 247.04 kB | 242.49 kB |
pnpm install --config.node-linker=hoisted |
hoisted | 200 | 66.89 kB | 64.72 kB |
This was independently controlled with Bun as well: Bun's isolated layout has
the same failure and its hoisted layout succeeds. Because pnpm reproduces the
failure without Bun, the behavior follows the dependency layout and appears to
be in the TanStack Start / Nitro bundling pipeline.
Complete minimal reproducer
https://github.com/astelmach20/tanstack-start-symlink-layout-repro
The repository contains no application code, credentials, or private
dependencies. A database is not required; the module fails during SSR startup
before the sample database URL can be used.
Steps to reproduce
git clone https://github.com/astelmach20/tanstack-start-symlink-layout-repro.git
cd tanstack-start-symlink-layout-repro
corepack enable
pnpm install --frozen-lockfile
pnpm build
pnpm preview
curl -i http://127.0.0.1:4173/
The build exits 0, then the request returns HTTP 500 with
createServerFn is not a function.
Hoisted control from a second clean clone:
pnpm install --frozen-lockfile --config.node-linker=hoisted
pnpm build
pnpm preview --port 4174
curl -i http://127.0.0.1:4174/
This returns HTTP 200.
Expected behavior
The generated SSR bundle should preserve module initialization order under
pnpm's supported default layout, or the build should fail instead of emitting a
bundle that cannot serve a request.
Platform
@tanstack/react-start: 1.168.28@tanstack/react-router: 1.170.18@tanstack/react-router-ssr-query: 1.167.1@tanstack/react-query: 5.101.2nitro: 3.0.260610-betavite: 8.1.5drizzle-orm: 0.45.2postgres: 3.4.9react/react-dom: 19.2.7- pnpm: 10.17.1
- Node: 23.7.0
- OS: macOS arm64; the equivalent isolated-layout failure was also observed in
a Linux serverless runtime - Bundler: Vite / Nitro (node-server preset)
Additional context
- Possibly related: #8031 and rolldown/rolldown#9993. This reproduction is much
smaller and specifically isolates dependency layout on Vite 8.1.5. - Independent package-manager controls and analysis:
https://github.com/oven-sh/bun/issues/39963#issuecomment-5370518454 - The minimal trigger is
src/schema.tsplus its import insrc/data.ts.
- Lenguaje dominante
- TypeScript
- Estrellas
- 15.3k
- Forks
- 1.9k
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 46
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/router
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Masked navigation drops the first character of the hash each time (__tempLocation hash missing '#')Posiblemente ocupada @hassanabrar202 la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
router-generator: lazy-load Prettier (costs ~300–450ms per build even when formatting is off)Posiblemente ocupada @Sheraff la tomó hace 27 días. Abiertopackage: router-generator performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
router-generator: sibling `physical()` subtrees in a virtual route config generate duplicate identifiersPosiblemente ocupada @Sheraff la tomó hace 27 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
docs(router): clarify static title fallback in SPA modePosiblemente ocupada @Rohan-Dedhia la tomó hace 17 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/router
Issues similares
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPosiblemente ocupada @anshulchikhale30-p la tomó hoy. Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Add: GTrekkerAbiertocheck:passed streams:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Koenkk/zigbee-herdsman-converters#13900 ·
Los mantenedores suelen responder en 1 día
-
area: ui Bug Payload OSS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
payloadcms/payload#19839 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jeanibarz/knowledge-base-mcp-server#1291 ·
Los mantenedores suelen responder en 1 día