Skip to content

拉取antdv源码,在安装依赖后进行compile报错 #8049

Open
@zxywftr

Description

@zxywftr
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.2.6

Environment

node@20.10.0; pnpm@10.5.2; Windows 11 家庭版

Reproduction link

https://github.com/zxywftr/ant-design-vue

Steps to reproduce

  1. 拉取ant-design-vue@4.2.6源码,使用main分支
  2. 使用pnpm安装依赖
  3. 使用命令pnpm compile进行编译

What is expected?

  1. 编译时能够不报错
  2. 运行 https://github.com/zxywftr/testAntdOfVue.git 中的build命令时能够正常的进行构建,而不是报错error TS2742: The inferred type of 'default' cannot be named without a reference to .....

What is actually happening?

  1. 报错error TS2742: The inferred type of 'default' cannot be named without a reference to '.pnpm/vue-types@3.0.2_vue@3.5.13_typescript@4.9.5_/node_modules/vue-types'. This is likely not portable. A type annotation is necessary.
  2. 基本上所有组件都报了这个问题, TypeScript: 2038 declaration errors, TypeScript: -1586 emit errors

  1. 我尝试用vite去二次封装antdv
  2. 引入文件后编译报错, 遂寻到antdv源码试着编译,后发现此问题
  3. 业务代码的最小重现在: https://github.com/zxywftr/testAntdOfVue.git

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions