ValidationError: Progress Plugin crash when webpack resolves to 5.106.2

Đang mở Phù hợp với người mới
#486 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

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
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
javascript, webpack
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu tại 10up-toolkit/scripts/build.js:30, nơi các tùy chọn của ProgressPlugin được truyền vào, và so sánh các tùy chọn đó với schema của webpack 5.106.2 được mô tả trong issue. Tái hiện với webpack 5.106.2 và xác nhận rằng build thành công mà không cần npm override, đồng thời vẫn duy trì khả năng tương thích với 5.105.2.

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

Mô tả

Describe the bug

Running 10up-toolkit build (or start) fails immediately with a ValidationError
from webpack's ProgressPlugin when npm resolves webpack to 5.106.2.
The same setup works correctly with webpack 5.105.2.

Steps to Reproduce
  1. Create a project with [email protected] as the only dev dependency (no explicit webpack pin).
  2. Run npm install — npm resolves webpack to 5.106.2.
  3. Run npm run build.
Error Output

ValidationError: Invalid options object. Progress Plugin has been initialized
using an options object that does not match the API schema.

options should be one of these: object { activeModules?, dependencies?, dependenciesCount?, entries?, handler?, modules?, modulesCount?, percentBy?, profile? } | function Details:
options has an unknown property 'name'.
options has an unknown property 'color'.
options has an unknown property 'reporters'.
options has an unknown property 'reporter'.

Full stack trace points to 10up-toolkit/scripts/build.js:30.

Root Cause

webpack 5.106.2 removed the name, color, reporters, and reporter
properties from the ProgressPlugin options schema. 10up-toolkit's build
script passes an options object containing those properties, which now fails
schema validation.

Workaround

Pin webpack to 5.105.2 via npm overrides in package.json:

"overrides": {
  "webpack": "5.105.2"
}

Then reinstall:

rm -rf node_modules package-lock.json && npm install
Expected Behaviour

npm run build should work with the webpack version npm resolves automatically, without requiring a manual override.

Screenshots, screen recording, code snippet

No response

Environment information
  • 10up-toolkit: 6.5.1
  • webpack (broken): 5.106.2
  • webpack (working): 5.105.2
  • Node.js: v24.14.0
  • npm: 10.x
  • Device: MacBook Pro
  • OS: Tahoee 26.4.1
WordPress information

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
Ngôn ngữ chính
JavaScript
Star
147
Fork
21
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

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.

Issue khác của 10up/10up-toolkit

Tất cả issue của 10up/10up-toolkit

Issue tương tự

Thêm issue về JavaScript

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.