question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not work with Vue 2.5.18

See original GitHub issue

Just 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:closed
  • Created 5 years ago
  • Reactions:32
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
ktsncommented, Dec 10, 2018

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.

13reactions
bliequecommented, Feb 19, 2019

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 and vue-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 a sfc.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’s components{}.

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found