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.

Volar seems to think that all my .vue components are written in JSX

See original GitHub issue

Hi,

Recently my vue projects that are using typescript / volar are littered with JSX errors. It seems that suddenly all my vue-html templates in .vue files are assumed to be written in JSX when in fact I am not passing any lang attribute to the template tag. I get errors like these:

Type '{ class: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'. Property 'class' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'. Did you mean 'className'?ts(2322)

and

JSX element type '__VLS_31' does not have any construct or call signatures.ts(2604)

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
johnsoncodehkcommented, Oct 5, 2021

Duplicate of #553

0reactions
johnsoncodehkcommented, Oct 27, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

JSX issues in template · Discussion #592 · johnsoncodehk/volar
I believe the reason VSCode TS extension does not support this feature is that for large projects, each language server instance of tsconfig...
Read more >
Why does Vue 3 need Volar in VS Code but React works out ...
Hi, I'm a backend dev recently getting my feet wet in frontend world; ... Note that tout can write Vue using JSX in...
Read more >
Vue with TSX - the perfect duo!? - Arek Nawo
From all the available JavaScript frameworks, I'd say that Vue and React are my favorites. React for its vast ecosystem, great TypeScript ...
Read more >
Vue 3 The template root requires exactly one element. eslint ...
Vue 3 supports multiple root components, so this isn't an issue with the way the template is written. It's a linting issue and...
Read more >
Style Guide - Vue.js
However, we don't believe that any style guide is ideal for all teams or ... the data property on a component (i.e. anywhere...
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