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.

JSX issue when using in Vue 3 with Typescript

See original GitHub issue

Description

When using the vue3 package FullCalendar component (with typescript), VSCode comes up with the following error. Property 'template' does not exist on type 'JSX.IntrinsicElements'.ts(2339)

image

Replication

Open the fullcalendar-example-projects repository - go to the vue3-typescript folder (https://github.com/fullcalendar/fullcalendar-example-projects/tree/master/vue3-typescript)

Open it in VsCode

Observe on line 115 - vue3-typescript/src/Demo.vue image

I did a bit of digging and it worked by completely removing the typings file: @fullcalendar\vue3\dist\main.d.ts I think it may be something that file is importing is causing the issue

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
treighmawakacommented, Jan 7, 2022

@MikesGlitch this might be an issue with the Volar extension, if you’re using it. See #https://github.com/johnsoncodehk/volar/issues/552. I remember having to downgrade to v0.27.26 because in later versions, “template virtual code is changed to JSX to improve generic component support” to quote the project owner.

3reactions
jhoermanncommented, Jun 17, 2022

I have this same error. It comes from the preact dependency, with typings in the jsx.d.ts file.

Is there a way to disable this? Cause it throws errors for any unsupported attributes. see image below.

Screen Shot 2022-05-07 at 8 30 27 AM

@maukoese See https://github.com/johnsoncodehk/volar/discussions/592#discussioncomment-2163786 to disable the preact typings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Vue 3 with JSX and TypeScript - Paul Shen
I migrated the codebase to Vue 3 and now we're writing Vue components with JSX with TypeScript. There's relatively little documentation in the ......
Read more >
Vue3 + TS: All global compnents throw "JSX element type '___ ...
This error comes from Vue Language Features (Volar). issue page. Rolling back the volar plug-in to version 0.36.1 can solve this problem.
Read more >
How to use Vue.js with JSX and TypeScript - Sketchboard
You get to navigate using VSCode from HTML to TypeScript code and have a strong static type support like renaming possibilities and tool...
Read more >
How to use Vue 3 with TypeScript - LogRocket Blog
In this tutorial, we'll demonstrate how to build a Vue app completely in TypeScript. We'll highlight some of the benefits of using TypeScript...
Read more >
Vue with TSX - the perfect duo!? - Arek Nawo
Diving into Vue 2 and Vue 3 and their TypeScript and TSX support! ... This includes using JSX, even TSX (JSX with TypeScript)!...
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