Bug: wrong dependency version of @rc-component/util

Đang mở Phù hợp với người mới
#593 0 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
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

So sánh dependency @rc-component/util trong package.json với import useControlledState trong index.tsx. Tái hiện lỗi phân giải được báo cáo của Yarn 4 và Vite, sau đó xác minh rằng khai báo dependency được phân giải thành một phiên bản util có export hook đó và import gây lỗi hoạt động thành công.

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

Mô tả

In index.tsx the following line was introduced:
import { useControlledState } from '@rc-component/util';

this will definitely not fork with util@1.2.1. But ^1.2.1 is defined as dependency in package.json.

In my setup yarn 4.9.2 ant.design transitively resolves so that a local node_modules with util in 1.2.1 is used.

In effect vite resolution fails with lines:

[jc-vue]: ../node_modules/@rc-component/trigger/es/index.js (19:9): "useControlledState" is not exported by "../node_modules/@rc-component/trigger/node_modules/@rc-component/util/es/index.js", imported by "../node_modules/@rc-component/trigger/es/index.js".
[jc-vue]: file: /Users/leider/Dev/JavascriptDev/JC-Backoffice/application/node_modules/@rc-component/trigger/es/index.js:19:9
[jc-vue]:
[jc-vue]: 17: import { getAlignPopupClassName } from "./util";
[jc-vue]: 18: import UniqueProvider from "./UniqueProvider";
[jc-vue]: 19: import { useControlledState } from '@rc-component/util';
[jc-vue]: ^

Ngôn ngữ chính
TypeScript
Star
391
Fork
245
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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 react-component/trigger

Tất cả issue của react-component/trigger

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.