[BUG]: `events` is required but not declared in dependencies
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 83/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, webpack
- Lĩnh vực
- build-system, frontend
Hướng nghiên cứu
Bắt đầu bằng cách đọc package.json và ba tệp được nêu trong báo cáo: src/lib/events.js, src/snapshot/toimage.js và src/snapshot/svgtoimg.js. Tái hiện lỗi bằng lệnh nghiêm ngặt pnpm install và webpack được cung cấp. Công việc được xem là hoàn tất khi gói khai báo dependency events cần thiết và bản build production thành công với các lần cài đặt nghiêm ngặt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
src/lib/events.js, src/snapshot/toimage.js and src/snapshot/svgtoimg.js call require('events'), but events is not in the dependencies of package.json.
Since webpack 5 no longer polyfills Node.js core modules, the bundler resolves events to whatever version the package manager happens to hoist.
Today, it only resolves through a transitive dependency: regl-scatter2d → glslify → glslify-deps → events.
With strict installs (pnpm with hoist=false, Yarn PnP), the build fails.
With hoisted installs, another package's events can be picked up instead (e.g. [email protected]).
This happens with the latest release (4.2.0) and with 2.x.
events is the only Node.js core module still required under src/ (see also #6014 for older ones).
Steps to reproduce
package.json:
{
"dependencies": { "plotly.js": "4.2.0" },
"devDependencies": { "webpack": "5.106.0", "webpack-cli": "6.0.1" }
}
src/index.js:
import Plotly from "plotly.js/lib/core";
console.log(Plotly.version);
pnpm install --config.hoist=false
npx webpack --mode production
ERROR in ./node_modules/.pnpm/[email protected]/node_modules/plotly.js/src/lib/events.js 3:19-49
Module not found: Error: Can't resolve 'events' in '.../node_modules/.pnpm/[email protected]/node_modules/plotly.js/src/lib'
- Ngôn ngữ chính
- JavaScript
- Star
- 18.4k
- Fork
- 2.1k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 plotly/plotly.js
-
[BUG]: `sankey`: `node.x` / `node.y` of `0` is ignoredCó thể đã có người làm @adimalkar đã nhận 5 ngày trước. Đang mởbug P3 size: 1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
plotly/plotly.js#8150 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: `scatterpolargl` drops points between 10000 and 100000 pointsCó thể đã có người làm @Tanishdete333 đã nhận 5 ngày trước. Đang mởbug P3 size: 1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
plotly/plotly.js#8148 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: findEmpties throws "iterated with no new neighbors" for large NaN regions in contour (double-precision underflow)Có thể đã có người làm @davrens101 đã nhận 4 ngày trước. Đang mởbug P3 size: 3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
plotly/plotly.js#8108 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore P3 plotly-internal size: 3 task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
plotly/plotly.js#8064 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore P1 plotly-internal size: 1 task
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của plotly/plotly.js
Issue tương tự
-
cdx-audit output written to a pipe is cut off at 64 KiBCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug mode:cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Fei2411/DeepSeek-Bot#963 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Miaotofu01/Study-Mate#244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test-reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/azure-sdk-for-js#40672 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày