Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'packages/common/src' #1292

Closed
cxp-13 opened this issue Dec 23, 2024 · 4 comments · Fixed by #1294
Closed

Cannot find module 'packages/common/src' #1292

cxp-13 opened this issue Dec 23, 2024 · 4 comments · Fixed by #1294

Comments

@cxp-13
Copy link

cxp-13 commented Dec 23, 2024

What happens?

我需要获取连接钱包的地址,按照给的演示代码。但是address属性不存在

How To Reproduce

导入
import { ConnectButton, Connector, useAccount } from '@ant-design/web3';
编写获取account

const { account } = useAccount();

控制台报错
image
源码报错:
image

Context

  • Ant Design Web3 Version: "^1.18.1"
  • Node Version: v22.12.0
  • Platform: window
@yutingzhao1991
Copy link
Collaborator

account 可能是 undefined,你试试改为 account?.address 看看。

@yutingzhao1991
Copy link
Collaborator

看了下,构建出来的 ts 类型确实有问题 account: import("packages/common/src").Account | undefined; 应该是 account: import("@ant-design/web3-common").Account | undefined; 才对。

你可以先 ignore 下这个类型的报错,我们修复一下发个新版本。

@yutingzhao1991
Copy link
Collaborator

应该和之前 #1200 这个 PR 处理的问题是同一个

@yutingzhao1991
Copy link
Collaborator

试一下 1.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants