`dts-gen` doesn't work with `cloudflare-video-element`: require() of ES Module not supported.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
Tái hiện lỗi với dts-gen -m cloudflare-video-element trên Node.js 20.5.1, sau đó kiểm tra dist/run.js quanh dòng 84, nơi module được tải bằng require(). Xác định việc tạo declaration nên xử lý ES module này như thế nào và xác minh rằng lệnh hoàn tất thành công đối với package được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I tried generating for this project cloudflare-video-element but it failed with the following error. (I tried both project install and global install. The error is the same.)
dts-gen -m cloudflare-video-element
Unexpected crash! Please log a bug with the commandline you specified.
/opt/homebrew/lib/node_modules/dts-gen/dist/run.js:84
result = guess.generateModuleDeclarationFile(args.module, require(args.module));
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/homebrew/lib/node_modules/cloudflare-video-element/cloudflare-video-element.js from /opt/homebrew/lib/node_modules/dts-gen/dist/run.js not supported.
Instead change the require of cloudflare-video-element.js in /opt/homebrew/lib/node_modules/dts-gen/dist/run.js to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (/opt/homebrew/lib/node_modules/dts-gen/dist/run.js:84:67) {
code: 'ERR_REQUIRE_ESM'
}
Node.js v20.5.1
- Ngôn ngữ chính
- TypeScript
- Star
- 422
- Fork
- 237
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/DefinitelyTyped-tools
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
microsoft/DefinitelyTyped-tools#1324 · 9 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
microsoft/DefinitelyTyped-tools#1230 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/DefinitelyTyped-tools#1229 ·
-
mergebot staleness comments do not respect tooManyOwnersCó thể đã có người làm @copilot-swe-agent đã nhận 335 ngày trước. Đang mở
microsoft/DefinitelyTyped-tools#1218 · 1 reaction · 1 người được giao ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
microsoft/DefinitelyTyped-tools#1211 · 1 bình luận ·
Tất cả issue của microsoft/DefinitelyTyped-tools
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jessepollak/home#2223 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
grep fixture corpus test follows the corpus's loop symlink under the receipt runner (fails on main)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
code-yeongyu/senpi#3756 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
org:external package:deepagents priority:triage topic:memory topic:middleware type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
langchain-ai/deepagents#7059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
osmlab/name-suggestion-index#12992 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
hemilabs/ui-monorepo#2506 ·
Maintainer thường phản hồi trong vòng 1 ngày