i get errors in vscode but every thing works correctly .
some errors :
Type expected.
[{
"resource": "/C:/Users/Dell/Desktop/vite-project/src/App.tsx",
"owner": "typescript",
"code": "1110",
"severity": 8,
"message": "Type expected.",
"source": "ts",
"startLineNumber": 10,
"startColumn": 6,
"endLineNumber": 10,
"endColumn": 7
}]
Cannot find name 'div'.
'>' expected.
…
2
Answers
I was able to resolve the issue by updating the "jsx" setting in my tsconfig.json file. Initially, it was set to "jsx": "react", but changing it to "jsx": "preserve" solved the problem for me. Here's the updated snippet from my
tsconfig.json
:Additionally, I updated the TypeScript version to use the workspace version.
To hone in on the issue open an empty folder with vsc and in terminal try: