-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property 'div' does not exist on type 'JSX.IntrinsicElements'. #14011
Comments
|
Hello, Not sure if you are using the code within StackBlitz or vscode or other IDE. When you do A new folder appears called When I create the project locally on my computer and run |
I used npm and I have done `npm i`.
The StackBlitz should install dependencies automatic.
ZENKIE
…---Original---
From: ***@***.***>
Date: Thu, Aug 3, 2023 19:06 PM
To: ***@***.***>;
Cc: "Zenkie ***@***.******@***.***>;
Subject: Re: [vitejs/vite] Property 'div' does not exist on type 'JSX.IntrinsicElements'. (Issue #14011)
Hello, Not sure if you are using the code within StackBlitz or vscode or other IDE.
When you do pnpm create ***@***.*** and select one of the options that provides a typescript solution. After you've done you have to install the dependencies after the react vite project has been created.
A new folder appears called node_modules and I do not see it appear in StackBlitz ( even when I run npm install ) which is needed to reference the types to make sure typescript works correctly with the IDE.
When I create the project locally on my computer and run npm install or pnpm install I do not get the errors what you get. So check if stackblitz doesn't have any issues.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This happens to me out of the box with the unmodified template using yarn 3. This is not StackBlitz, just the Mac Mini sitting on my desk. Editor is a non-factor. Feels like a PnP issue.
|
Actually Vite haven‘t give me an error, it‘s just an Editor warning. But when I use NextJS, they got no problem about this.😥 |
@ZenkieBear I was having the same errors on VSCode and updating it solved for me. |
Update what?
ZENKIE
…---Original---
From: "Leandro ***@***.***>
Date: Sat, Aug 12, 2023 19:02 PM
To: ***@***.***>;
Cc: "Zenkie ***@***.******@***.***>;
Subject: Re: [vitejs/vite] Property 'div' does not exist on type 'JSX.IntrinsicElements'. (Issue #14011)
Actually Vite haven‘t give me an error, it‘s just an Editor warning. But when I use NextJS, they got no problem about this.😥
I was having the same errors on VSCode and updating it solved for me.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
change the |
Just encountered same problem on my machine.. |
This was the correct answer for me. I used Neovim + CoC.nvim with coc-tsserver. Worked fine after the modification. |
Closing as this seems to be fixed in stackblitz repro. |
For anyone else that might have this problem. Setting workspace typescript version in VS Code solved it for me: In the VS Code command palette, run the |
Brilliant! |
Describe the bug
This problem will appear when I use vite build a
react-ts
project.When I write some HTML element in JSX, IDE will always prompt
Property '...' does not exist on type 'JSX.IntrinsicElements'.
. I‘d not change anything, it‘s just a default project create by vite.Actually, the react-ts template preset provided on the vite official website also within this problem.

Reproduction
https://stackblitz.com/edit/vitejs-vite-88gtsm?file=index.html&terminal=dev
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: