File Is Not Included In Any Tsconfig.json File
When this happens, you lose critical IDE features for that specific file, such as , IntelliSense , and auto-imports . Common Causes
Then, optionally, reference it in your root tsconfig.json using project references: file is not included in any tsconfig.json
If you have a file that should not use the main project’s settings (e.g., a Node.js script in a frontend project), give it its own TypeScript context. When this happens, you lose critical IDE features
Add to "exclude" :
"compilerOptions": "target": "ES2020", "module": "commonjs", "strict": true , "include": [ "src/**/*", // Add your file's location "scripts/**/*", // Additional directories "*.ts" // Root level TypeScript files ] When this happens
If you have spent any time working with TypeScript in a modern code editor (especially Visual Studio Code), you have likely encountered the red squiggly line under an import statement accompanied by the perplexing error message:
"extends": "./tsconfig.json", "compilerOptions": "module": "CommonJS", "outDir": "./dist-scripts" , "include": ["migrate-db.ts"], "exclude": ["src", "tests"]