我现在已经在Vite中安装了React ts,但它在tsconfig中显示了一个错误,我不知道为什么,因为我甚至还没有尝试更改安装的代码,这是什么原因?
enter image description here1. error: Specify how TypeScript looks up a file from a given module specifier.
See more: [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 "
https://www.typescriptlang.org/tsconfig#moduleResolution
")
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
1条答案
按热度按时间ulydmbyx1#
尝试将vs代码中的typescript版本更改为“使用工作区版本”like that