Skip to content

@vue/compat error with Cannot read properties of undefined (reading 'getPrefixCls') #5765

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

Closed
1 task
HenryWong-fe opened this issue Jul 1, 2022 · 6 comments · Fixed by #5973
Closed
1 task
Labels

Comments

@HenryWong-fe
Copy link

HenryWong-fe commented Jul 1, 2022

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

Version

3.2.6

Environment

vue version 3.2.36

Reproduction link

https://github.com/HenryWong-fe/vue-compet-ant-design-vue

Steps to reproduce

在使用@vue/compat做vue2项目升级时,使用ant-design-vue会出现报错

What is expected?

可以使用@vue/compat的同时,使用ant-design-vue

What is actually happening?

无法使用

@tangjinzhou
Copy link
Member

@vue/compet 是什么,不知道

@HenryWong-fe
Copy link
Author

HenryWong-fe commented Jul 1, 2022

@vue/compat 是什么,不知道

这是官方提供的,用于vue2升级至vue3的方案,对于项目已经很庞大的我们来说,没有办法直接升级vue3

这里是官方文档: https://github.com/vuejs/core/tree/main/packages/vue-compat#readme

这里是之前其他人提出的相关问题: #4368 (comment)

这里同样未解决,使用ant-design-vue 2.2以上版本都出现了以上问题

@HenryWong-fe HenryWong-fe changed the title @vue/compet error with Cannot read properties of undefined (reading 'getPrefixCls') @vue/compat error with Cannot read properties of undefined (reading 'getPrefixCls') Jul 1, 2022
@adnabb
Copy link

adnabb commented Jul 4, 2022

the same.

@tangjinzhou
Copy link
Member

看着是 @vue/compat 的问题,对于函数式组件的转换出了问题,你可以去给 @vue/compat 提issue

@Tiquiero
Copy link

@HenryWong-fe 请问这个问题有解决办法嘛?

garretmh added a commit to garretmh/ant-design-vue that referenced this issue Sep 19, 2022
closes vueComponent#5765

Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
tangjinzhou pushed a commit that referenced this issue Sep 26, 2022
closes #5765

Add `compatConfig: { MODE: 3 }` to all component definitions to signal to `@vue/compat` not to use any Vue 2 compatibility features.
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants