commonjs - Missing export (Error: ... is not exported by ...)
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
- Rollup Plugin Name: commonjs
- Rollup Plugin Version: 20.0.0
- Rollup Version: 2.56.3
- Operating System (or Browser): macOS
- Node Version: 16
- Link to reproduction (⚠️ read below): https://replit.com/@danielcgindi/rollup-plugin-repro-4
Expected Behavior
Should correctly export whatever is imported.
Actual Behavior
Weird and irrelevant export.
The piece of code (importDeclaration.module.info.code) that fails looks like this:
import * as commonjsHelpers from "�commonjsHelpers.js";
import { __exports as mongodb } from "\u0000/Users/user/git/server/node_modules/mongodb/index.js?commonjs-exports"
export default commonjsHelpers.commonjsRequire("/$$rollup_base$$/node_modules/mongodb/index.js", "/$$rollup_base$$/node_modules/mongodb");
@lukastaegert this looks like it's originating from the latest refactor during the circular dependencies support. While mongodb cannot be rolled up normally as it has severe circular dependencies, it seems to not be able to be rolled up dynamically too due to this bug. It looks like this should have been a reexport of __exports or at least *.
I tried to look into this and have not found what causes this to compose in such a way.
It's probably line 228 in index.js, but how do we make it play well with the other stuff that's being shoved in there?
- Ngôn ngữ chính
- JavaScript
- Star
- 3.8k
- Fork
- 635
- 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 rollup/plugins
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Support js-yaml v5 Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của rollup/plugins
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Daemon passes --experimental-wasm-jspi unconditionally on Node >= 24; Node 26 rejects the flag Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Automattic/studio#4908 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
sugarlabs/musicblocks#8847 ·