-
Notifications
You must be signed in to change notification settings - Fork 431
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
Does not work with Vue 2.5.18 #294
Comments
After some digging, I've found that this appears to be caused by vuejs/vue#8595. I'm not sure exactly what's going on, but having a class method (defined in Changing diff --git a/types/vue.d.ts b/types/vue.d.ts
index 349c3432..144fa869 100644
--- a/types/vue.d.ts
+++ b/types/vue.d.ts
@@ -111,9 +111,9 @@ export interface VueConstructor<V extends Vue = Vue> {
component<Props>(id: string, definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): ExtendedVue<V, {}, {}, {}, Props>;
component(id: string, definition?: ComponentOptions<V>): ExtendedVue<V, {}, {}, {}, {}>;
- use<T>(plugin: PluginObject<T> | PluginFunction<T>, options?: T): this;
- use(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): this;
- mixin(mixin: VueConstructor | ComponentOptions<Vue>): this;
+ use<T>(plugin: PluginObject<T> | PluginFunction<T>, options?: T): VueConstructor<Vue>;
+ use(plugin: PluginObject<any> | PluginFunction<any>, ...options: any[]): VueConstructor<Vue>;
+ mixin(mixin: VueConstructor | ComponentOptions<Vue>): VueConstructor<Vue>;
compile(template: string): {
render(createElement: typeof Vue.prototype.$createElement): VNode;
staticRenderFns: (() => VNode)[]; |
This is probably caused by variance check. I can give it a look. |
The cause is this commit which sets return type of class methods of Vue to itself. |
I have just received exactly the same error: ERROR in C:/Users/nemet/tiva11/tiva11forvue/src/components/HelloWorld.vue Is there a workaround? Thanks. |
I am having the same issue. I spent the better part of three hours working on this. There is a work around go to |
I've just found another workaround: When creating my project with CLI 3 I set NO to the question "Use class-style component syntax?", so the problem is definitely with those nifty decorators :-) |
The change which introduced this breakage mentioned that all tests passed. Maybe some test cases which use Vue, decorators and TypeScript together should be added, since a lot of people use them? |
Type 'VueClass' is not assignable to type 'typeof App'. @HerringtonDarkholme @ktsn [email protected] ~~~ vue break change. |
I really appreciate your work, Friends. We've recently moved from another well-known JS framework over to Vue/Vuetify because CLI3 supports directly TypeScript as first class citizen. In our organization management would never allow to start a project with a programming language without a strong, well-supported type system. The other framework-chain we evaluated first had a powerful type system, but it wasn't integrated, and it was terribly slow; this was enough reason we started looking for a better solution, so we found Vue/TS/CLI3/Vuetify. The technical evaluators have to give a presentation that Vue/Vuetify with its out-of-the box support for TS (and a number of other goodies, like PWA), which came with CLI3, would be perfect for the requirements of our mobile/web business application project. When we saw how simple was to add Vuetify to a TS (sic!) project with "vue add Vuetify", all the IT management wowed. |
Just got hit by this. Did an update and project failed to compile anymore. Vue bootstrapping uses the new @Component/@prop decorator syntax for the example templates and this breaks any project using it.
|
We already figured out the cause and a patch is already created vuejs/vue#9173 |
I seem to be getting this issue, but I'm not using the class component pattern. Is it likely to be related? I've tried pulling back
I've no doubt this is the wrong place for this, but I'm at a bit of a loss. Sorry! Edit: After looking again, this seems to be a separate error. Is there a better place to post this? |
Just sharing a related issue that may help others... I inadvertently hijacked the component's
This caused the following error:
which in turn triggered the error mentioned by the OP:
|
@tvkit Your issue is not related with this issue and already fixed in v7.2.1 |
I've just had this issue. I tried updating vue but no avail. Tried setting
|
same problem here... just updated to [email protected] and [email protected] |
Looks like this issue is reproducible also in latest Vue 2.6.12 ... it breaks everything after updating dependencies with npm update ... what is the workaround ? i have been searching a solution for days... |
@ktsn Maybe this issue should be locked, because people are still coming here with similar problems, but not finding any help. For anybody having “this” problem.Please first of all reproduce it in a minimal example. If you are then confident that you found a problem with this package, still do not post here in this threat. Furthermore, to make sure people can help you, the best approach is to share your example in a repository |
After npm install it gives me the latest Vue , version 2.6.12. Also i have node js bigger than 12.16.1 ... any ideas ? Type 'VueClass' is not assignable to type 'typeof App'. Here is my package json . what else should be helpful ? |
Just create a new project with Vue CLI and you get a
This happens since the update of Vue and vue-template-compiler to version
2.5.18
. With2.5.17
everything works.The text was updated successfully, but these errors were encountered: