Typescript errors in code

Hi i have a wired issue. In all my typescript projects there is like everything marked as a error. Examples are in the screenshot. I searched the web and tried a lot of things, like updating ts, modifying the tsconfig and eslint config. But the problem appears in all my projects and in cursor and vscode. It runs grate but all these red error are a little bit annoying.
No description
6 Replies
Huijiro
Huijiro12mo ago
Typescript doesn't know JSX exists, you need to enable it, I forget how now.
qnbs
qnbs12mo ago
Did you include
"jsx": "preserve" in your tsconfig?
DumDum
DumDum12mo ago
Can you add import React fro "react"; at the top to see if that fixes the issue?
stpnx
stpnx12mo ago
try this one bro npm install @types/react @types/react-dom
.❀ tablet ❀.
.❀ tablet ❀.12mo ago
add "jsxImportSource": "react", "jsx": "react" and "jsxFactory": "h" to your tsconfig

Did you find this page helpful?