nodejs / nodejs/node

node:test and async register hooks broken after 24.12.0

オープン
#62,104 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンク先の krutoo/utils の tsimp-replaced ブランチとその npm test コマンドを使用して、Node.js 24.12.0 で freeze を再現し、その後、krutoo/ts-loader で説明されている loader と動作を比較します。module.register の async hooks と fetch ベースのサーバーリクエストを調査します。アップグレード後にテストスイートが完了し、loader サーバーがリクエストに応答すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, node.js, typescript
領域
backend, devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。