i recently got this weird issue when using the ng serve
command :
Application bundle generation failed. [1.788 seconds]
X [ERROR] File 'srcmain.ts' is missing from the TypeScript compilation. [plugin angular-compiler]
Ensure the file is part of the TypeScript program via the 'files' or 'include' property.
However, when I check the tsconfig.app.json
I can see that the file main.ts is indeed included :
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts"
],
"include": [
"src/**/*.d.ts",
"src/main.ts"
]
}
I checked on the internet for solution to this problem but none of them worked.
I’m using Angular 18.0.6 by the way.
Thank you very much