node:test and async register hooks broken after 24.12.0
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 122k
- Forks
- 37.3k
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 283
Descripción
Version
24.12.0
Platform
Darwin MSK-G4LQ6YF03T.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jan 19 21:59:23 PST 2026; root:xnu-11417.140.69.708.3~1/RELEASE_ARM64_T6030 arm64
Subsystem
No response
What steps will reproduce the bug?
Context
Hi, I have small TS loader for Node.js:
https://github.com/krutoo/ts-loader
I use it like:
npm i ts-loader@npm:@krutoo/ts-loader
node --import ts-loader ./test.ts
You can see real example with issue here:
https://github.com/krutoo/utils/pull/212
Under the hood loader just runs http server in first process and registers hooks by module.register
Hooks uses fetch to request server to complie modules
Problem
After upgrade to Node.js 24.12.0 server don't answer any requests, even from browser, there is tab that waits for response
I don't have skills to figure out the cause myself.
Tried log some steps, seems the server isn't accepting any incoming requests at all.
Even though the server itself has definitely been created, has taken over the port, and is accepting messages.
Can someone help to understand cause of this behavior?
How often does it reproduce? Is there a required condition?
Clone this repo and branch:
https://github.com/krutoo/utils/tree/tsimp-replaced
Then:
nvm install 24.12.0
npm use 24.12.0
npm i
npm run test
What is the expected behavior? Why is that the expected behavior?
Don't have enough skills to understand it is a bug or new behavior of async loader hooks
What do you see instead?
Tests freezes
Additional information
No response
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.
Línea de trabajo
Reproduce el freeze con Node.js 24.12.0 usando la rama vinculada tsimp-replaced de krutoo/utils y su comando npm test, y después compara el comportamiento con el loader descrito en krutoo/ts-loader. Investiga los hooks asíncronos de module.register y las solicitudes al servidor basadas en fetch; se considera terminado cuando la suite de pruebas se completa y el servidor del loader responde a las solicitudes después de la actualización.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js, typescript
- Área
- backend, devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100