Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Module federation warnings "No required version specified"

Đang mở
#92 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #215 của @andreasgerstmayr — đã đóng, không merge

Đá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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, webpack
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện quá trình build của plugin và kiểm tra barchart/package.json gần dòng 29 cùng barchart/rsbuild.config.ts gần dòng 54. Kiểm tra cách Module Federation xác định các phiên bản bắt buộc cho những module dùng chung được liệt kê. Được xem là hoàn tất khi quá trình build không còn phát ra các cảnh báo “No required version specified” này và cấu hình liên quan vẫn chính xác.

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

Mô tả

There are a lot of warnings in the build:

File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/Legend/Legend.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "immer" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module immer
 @ ../node_modules/@perses-dev/components/dist/Legend/index.js
 @ ../node_modules/@perses-dev/components/dist/index.js
 @ consume shared module (default) @perses-dev/components@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/ThresholdsEditor/ThresholdsEditor.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "immer" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module immer
 @ ../node_modules/@perses-dev/components/dist/ThresholdsEditor/index.js
 @ ../node_modules/@perses-dev/components/dist/index.js
 @ consume shared module (default) @perses-dev/components@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/components/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "@emotion/styled" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module @emotion/styled
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "lodash" in description file/s
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ /home/runner/work/plugins/plugins/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module lodash
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "date-fns-tz" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module date-fns-tz
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry
File: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/remote/PluginRuntime.js:1:1
  ⚠ No required version specified and unable to automatically determine one. Unable to find required version for "echarts" in description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json
  │ It need to be in dependencies, devDependencies or peerDependencies. file: shared module echarts
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/remotePluginLoader.js
 @ ../node_modules/@perses-dev/plugin-system/dist/remote/index.js
 @ ../node_modules/@perses-dev/plugin-system/dist/index.js
 @ consume shared module (default) @perses-dev/plugin-system@^0.51.0-beta.0 (strict) (fallback: /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/dist/index.js)
 @ ./src/BarChartOptionsEditorSettings.tsx
 @ ./src/BarChart.ts
 @ container entry

Originally posted by @Nexucis in https://github.com/perses/plugins/pull/73#pullrequestreview-2695834410

description file/s
  │ /home/runner/work/plugins/plugins/package.json
  │ /home/runner/work/plugins/plugins/node_modules/@perses-dev/plugin-system/package.json

I think it looks at the wrong file, shouldn't it look in package.json in the plugin subfolder: https://github.com/perses/plugins/blob/main/barchart/package.json#L29?
Alternatively, I've seen configs where rsbuild.config.ts imports package.json and specifies requiredVersion here: https://github.com/perses/plugins/blob/main/barchart/rsbuild.config.ts#L54

Ngôn ngữ chính
TypeScript
Star
32
Fork
87
Merge trung bình
2 ngày 43 phút
Pull request đã merge (30 ngày)
34

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

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

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 perses/plugins

Tất cả issue của perses/plugins

Issue tương tự

Thêm issue về TypeScript

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.