`1.5.0` regression: workers treated as ESM by default
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript, node.js
- Lĩnh vực
- backend
Hướng nghiên cứu
Start by running the duckdb-wasm bare-node example at examples/bare-node/index.cjs with web-worker 1.5.0, then compare it with 1.4.1. Trace how the worker script is loaded and how its module type is selected; done means the CJS worker runs under 1.5.0 without the module is not defined error while preserving the documented worker behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
Glad to stumbled on this neat project and looking forward to using it to write more consistent browser-node code.
I'm trying to get duckdb-wasm working in node, I found a bare-node example in their repo.
It fails when I run it, with error:
ReferenceError: module is not defined
It uses web-worker, and it seems like the worker code (clearly CJS and with file extension cjs) gets detected like an ESM module.
Downgrading web-worker from 1.5.0 to 1.4.1 fixes the issue. I tried a few other things like passing type: commonjs, type: classic - none worked.
Suggests a regression in 1.5.0 release (edit: unless changing the default behavior in 1.5.0 is intentional)
Thanks
Declan
- Ngôn ngữ chính
- JavaScript
- Star
- 1.2k
- Fork
- 57
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
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 developit/web-worker
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
developit/web-worker#57 · 1 bình luận · 3 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
developit/web-worker#51 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
developit/web-worker#30 · 3 bình luận · 9 reaction ·
-
Register submodule Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
developit/web-worker#27 ·
-
Add support for SharedWorker Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
developit/web-worker#25 ·
Tất cả issue của developit/web-worker
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Theme loads third-party resources on every page (jsdelivr web font, cdnjs Font Awesome) – GDPR Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nightscout/nocturne#1414 ·
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·