Port conflict (EADDRINUSE) when running typegen and dev server simultaneously
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript, vite
- Área
- devtools
Línea de trabajo
No se indica ningún archivo fuente ni ninguna prueba. Empieza rastreando la inicialización de DevTools compartida por dev server y typegen entry points, y después inspecciona las variables de entorno y los argumentos del proceso indicados. Se considera terminado cuando pnpm dev y los comandos de generación de tipos se ejecuten juntos sin el error EADDRINUSE y se conserve el comportamiento normal de DevTools.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Port conflict (EADDRINUSE) when running typegen and dev server simultaneously
Context
I'm using React Router DevTools with type generation tools (react-router typegen, safe-routes typegen).
Reproduction
When running type generation tools and the development server simultaneously, both try to bind to port 42069 (used by TanStack DevTools), resulting in an EADDRINUSE error.
Steps to Reproduce
# Terminal 1: Start dev server
pnpm dev
# Terminal 2: Run type generation
pnpm typegen
# or
react-router typegen
Error Message
Error: listen EADDRINUSE: address already in use :::42069
System Info
- OS: macOS 14.6.0 (Darwin 24.6.0)
- Node: v20.x
- Package Manager: pnpm 10.18.0
- react-router-devtools: 6.0.1
- @tanstack/devtools: 5.x
- Vite: 6.3.6
Used Package Manager
pnpm
Expected Behavior
Type generation tools and the dev server should be able to run simultaneously without port conflicts. The DevTools should automatically disable itself when running in a type generation context.
Actual Behavior
The second process fails to start due to port 42069 already being in use by TanStack DevTools, which is initialized by both the dev server and type generation process.
Possible Solution
Detect type generation context (via environment variables like TYPEGEN_RUNNING=1 or command-line arguments) and disable DevTools initialization when running type generation, preventing unnecessary port binding.
Implementation approach:
- Check for typegen indicators:
TYPEGEN_RUNNING=1,SAFE_ROUTES_TYPEGEN=1,process.argvincludes "typegen" - Return empty plugin array when in typegen context
- Maintain backward compatibility for normal dev mode
- Lenguaje dominante
- TypeScript
- Estrellas
- 975
- Forks
- 55
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin 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 code-forge-io/react-router-devtools
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
code-forge-io/react-router-devtools#247 · 12 comentarios ·
-
Add timestampAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
code-forge-io/react-router-devtools#242 · 2 comentarios ·
Todos los issues de code-forge-io/react-router-devtools
Issues similares
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedAbiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
codercops/discord-bot#152 ·
Los mantenedores suelen responder en 1 día
-
bug i18n
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
endora-commerce/endora-commerce#1315 ·
Los mantenedores suelen responder en 1 día
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Abiertoarea:data-quality importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
enorm-labs/event-junkie#5136 ·
Los mantenedores suelen responder en 1 día
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día