react-component / react-component/trigger

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

未关闭 适合新手
#593 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
391
派生
245
PR 合并指标
30 天内没有已合并 PR

描述

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]: ^

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

比较 package.json 中的 @rc-component/util 依赖与 index.tsx 中的 useControlledState 导入。重现报告的 Yarn 4 和 Vite 解析失败,然后验证依赖声明是否解析到导出该 hook 的 util 版本,并验证失败的导入是否成功。

由索引模型根据 Issue 内容生成。

评估

技术栈
react, typescript
领域
frontend
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。