I have installed React TS in Vite, but it is showing me an error in tsconfig.json. I can't figure out why because I haven't even tried to change the installed code yet. What is the reason?
[tsconfig.json ](https://i.sstatic.net/obFT4.png)
> 1. error: Specify how TypeScript looks up a file from a given module specifier.
>
> See more: [https://www.typescriptlang.org/tsconfig#moduleResolution](https://www.typescriptlang.org/tsconfig#moduleResolution)
>
> vscode-file://vscode-app/c:/Users/User/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-sandbox/workbench/workbench.html
>
> Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.
>
> 2. error: Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set.
>
> 3. error: Enable importing .json files
Try changing the typescript version in your vs code to "Use workspace version" like that
Adding the settings.json fix, which is in effect the same as the the top fix
This can be resolved by adding the following to your settings.json inside of your .vscode folder
{
"typescript.tsdk": "node_modules/typescript/lib"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With