Property ‘XXX’ does not exist on type ‘CombinedVueInstance’

As mentioned in the Typescript Support section of the Vue documentation:

Because of the circular nature of Vue’s declaration files, TypeScript may have difficulties inferring the types of certain methods. For this reason, you may need to annotate the return type on methods like render and those in computed.

In your case, you should change profilePath: function () { to profilePath: function (): string {

You might come across the same error if you have a render() method that returns a value, without a : VNode annotation.

Leave a Comment