Does not work with Vue 2.5.18
See original GitHub issueJust create a new project with Vue CLI and you get a
35:1 Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<Vue>>(target: VC) => VC' is missing the following properties from type 'typeof HelloWorld': exte
nd, nextTick, set, delete, and 7 more.
33 | import { Component, Prop, Vue } from 'vue-property-decorator';
34 |
> 35 | @Component
| ^
36 | export default class HelloWorld extends Vue {
37 | @Prop() private msg!: string;
38 | }
This happens since the update of Vue and vue-template-compiler to version 2.5.18
. With 2.5.17
everything works.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:32
- Comments:19 (4 by maintainers)
Top Results From Across the Web
2.5.18 - vue - npm
Funds donated via OpenCollective are managed with transparent expenses and will be used for compensating work and expenses for core team members ...
Read more >How do I fix a "Vue packages version mismatch" error on ...
If you use vue one version and vue-template-compiler another version, that's a problem. Run this command npm update vue-template-compiler.
Read more >Frequently Asked Questions - Vue.js
Despite the differences, the majority of Vue APIs are shared between the two major versions, so most of your Vue 2 knowledge will...
Read more >vue 2.5.18 - NuGet
Version Downloads Last updated
2.6.11 190,644 12/17/2019
2.6.10 122,058 8/1/2019
2.6.9 587 8/1/2019
Read more >Problem with getting Vue Storefront up and running - Issues
Following the instructions on our Vue Storefront guide: npx @vue-storefront/cli init vsf-lz-test cd vsf-lz-test npm i npx @layer0/cli init ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We already figured out the cause and a patch is already created https://github.com/vuejs/vue/pull/9173 Please wait until the next patch version of Vue is released, use Vue <= 2.5.17 or configure
"strictFunctionTypes": false
.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
vue
andvue-template-compiler
to 2.5.17, but I’m still getting this:TS2322: Type 'VueConstructor<{ message: string; } & Vue>' is not assignable to type 'VueConstructor<Vue> | FunctionalComponentOptions<any, PropsDefinition<any>> | ComponentOptions<never, any, any, any, any, Record<string, any>> | AsyncComponent<any, any, any, any>'.
message
is a prop of my component. The component is being included from another package, and both packages are in a Lerna monorepo. Components in the same directory work OK. I have asfc.d.ts
covering the webpack alias the component is imported under. This definition does have an effect, as the error message changes if the definition is removed and the component is imported but not used (if it is used the message is the same). By “used” I mean referenced in App.vue’scomponents{}
.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?