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.

"Property 'default' does not exist on type '{}'." On Router-view and Router-link v-slot

See original GitHub issue

Repository to reproduce the error https://github.com/sibyl666/issue

When v-slot is used with router-view it gives the error “Property ‘default’ does not exist on type ‘{}’.” this wasn’t an issue a while ago with the same vue-router version on another repo, When I check the other repo it shows the same error so that’s why I think the issue is related to the extension. Repository created with yarn create vite issue --template vue-ts image

Vue Language Features (Volar) version v0.27.27 TypeScript Vue Plugin (Volar) version v0.27.27

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
johnsoncodehkcommented, Oct 3, 2021

Fixed in https://github.com/johnsoncodehk/volar/commit/d587ab162cf09fe79cec5a0f22624870b7ca08c0, please wait for release or use 0.27.26 for now, thanks!

@innocenzi it’s fixed in #540.

Please keep this issue open, I will close when I release new version.

1reaction
sapphi-redcommented, Oct 2, 2021

Creating components.d.ts fixed for me. (https://github.com/johnsoncodehk/volar#using)

But I have a different error when noPropertyAccessFromIndexSignature is true.

Property 'default' comes from an index signature, so it must be accessed with ['default'].
Read more comments on GitHub >

github_iconTop Results From Across the Web

warning in vue-router 3.5.1: In Vue Router 4, the v-slot API will ...
It appears that you are using a <router-link> component with the event or tag property, and this will not work in Vue Router...
Read more >
API Documentation | Vue Router
Creates a hash history. Useful for web applications with no host (e.g. file:// ) or when configuring a server to handle any URL...
Read more >
vue-router - UNPKG
43, * handle any URL is not possible. 44, *. 45, * @param base - optional base to provide. Defaults to `location.pathname +...
Read more >
Vue.js - The Blue Book
The message property will be made available in the template. ... v-model works not only on text inputs, but also other input types...
Read more >
Routing & Navigation - ts - GUIDE - Angular
The Angular Router is an optional service that presents a particular component view for a given URL. It is not part of the...
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