-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Vue init with Vue 3, TypeScript and class-style components produces an error. #5795
Comments
Follow up of vuejs#5771 Fixes vuejs#5795 Fixes vuejs#5796
I have the same issue. @TobiasGraml11 @StringKe Did you fix that? |
i have the same problem |
@syphzur I could only fix the first issue by replacing |
I updated vue cli to 4.5.4, but the problem still exists |
@sodatea 有临时更改的方式,可以暂时使用么? |
I already sent a patch. vuejs/core#1943 |
Fixed in rc.8 |
I still encounter this problem with @vue/cli 4.5.4:
@sodatea which package do mean that should have version rc.8? |
@Kritten |
@maikelvl aah ok, but I'm on RC.9 and it is still the same error |
@Kritten Ok. If you provide a GitHub link to your code I could take a look for you. |
@maikelvl that would be awesome! And please note that the or you simply remove that part ;) |
@Kritten I've set it up and after quite some searching I found your problem. The Use the following code: // frontend/src/shims-vue.d.ts
declare module "*.vue" {
import { defineComponent } from "vue";
const component: ReturnType<typeof defineComponent>;
export default component;
} |
@maikelvl You are a lifesaver! Thank you, it does work now! |
@Kritten You're welcome. 😊 Happy to help. |
Version
4.5.3
Reproduction link
https://github.com/maikelvl/vue-cli-init-typescript-class-component
Environment info
Steps to reproduce
Generate project using
@vue/[email protected]
on Node v14.8.0:Vue CLI preset
What is expected?
What is actually happening?
Not sure if this is pure vue-cli issue, because there are a lot of alpha/beta/rc Vue dependencies.
Disabling class-style components does not have this effect.
The text was updated successfully, but these errors were encountered: