nodejs / nodejs/node

node:test and async register hooks broken after 24.12.0

Đang mở
#62,104 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
JavaScript
Star
122k
Fork
37.4k
Merge trung bình
4 ngày 3 giờ
Pull request đã merge (30 ngày)
272

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Tái hiện freeze với Node.js 24.12.0 bằng cách sử dụng branch tsimp-replaced được liên kết của krutoo/utils và lệnh npm test của branch đó, sau đó so sánh hành vi với loader được mô tả trong krutoo/ts-loader. Điều tra các async hooks của module.register và các yêu cầu đến server dựa trên fetch; được xem là hoàn tất khi test suite chạy hoàn tất và server của loader phản hồi các yêu cầu sau khi nâng cấp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
javascript, node.js, typescript
Lĩnh vực
backend, devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.