How to setup Vite + React + Typescript in VSCode

63 Views Asked by At

Creating a new React app using Vite, VSCode is not recognizing generated tsx files, showing squiggles everywhere. What am I doing wrong??

VSCode showing squiggles for the entire code

Here are the steps I'm doing:

yarn create vite@latest

Give a project name "my-app" Framework: React Variant: TypeScript

Now, for VSCode, according to Yarn doc, I've installed ZipFS extension then:

yarn dlx @yarnpkg/sdks vscode

Ctrl+Shift+P then Select Typescript version...VSCode version 5.5.0-dev.20240314 (I've installed ms-vscode.vscode-typescript-next extension aswell) .

After that, tsx files are still not recognized.

0

There are 0 best solutions below