Create a .vscode/settings.json in your project:
"include": [ "src/**/*.ts", // All TS files in src "src/**/*.tsx", // React TSX files "test/**/*.spec.ts", // Test files "config/*.ts" // Root config files ] file is not included in any tsconfig.json
"files": ["src/index.ts", "scripts/seed.ts"] Create a
"references": [ "path": "./tsconfig.script.json" ] // React TSX files "test/**/*.spec.ts"
Now go forth, configure your tsconfig.json with intention, and eliminate that error once and for all.
The error does not necessarily mean your code is broken. It means your editor’s TypeScript server cannot determine which compiler settings (target, module, strictness, etc.) to apply to that file for real-time checking.