Skip to content

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

@unixy24

Description

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

Version

4.2.6

Environment

[email protected]; [email protected]; Windows 11 家庭版

Reproduction link

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

Steps to reproduce

  1. 拉取[email protected]源码,使用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/[email protected][email protected][email protected]_/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions