Main.ts and polyfills.ts is missing from the TypeScript compilation.
If i am importing a invalid file means this file 404.ts is not in this location then first time when i do the ng serve then it shows me this error only

But when again I do the ctrl+s on any file then it shows me this error. I do not why.

tsconfig.app.json file code is this
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.ts"
],
"exclude": [
"src/test.ts",
"src/**/*.spec.ts"
],
"angularCompilerOptions": {
"enableIvy": true
}
}
Please help me how can i solve it. I have seen so many issues online but none solved my issue.
Can you please share the output of ng version?
Angular cli version is latest 8.3.21
@alan-agius4 here is the output of ng version
Angular CLI: 8.3.21
Node: 10.15.3
OS: win32 x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.803.21
@angular-devkit/build-angular 0.803.21
@angular-devkit/build-optimizer 0.803.21
@angular-devkit/build-webpack 0.803.21
@angular-devkit/core 8.3.21
@angular-devkit/schematics 8.3.21
@angular/cdk 8.2.3
@angular/cli 8.3.21
@angular/material 8.2.3
@angular/material-moment-adapter 8.2.3
@ngtools/webpack 8.3.21
@schematics/angular 8.3.21
@schematics/update 0.803.21
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2
@alan-agius4 any help regarding this.
@ErVishalM, since you are using Ivy, can you try using version 9? A number of Ivy related fixes are only present in version 9.
ng update @angular/core @angular/cli --next
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information.
If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template.
I've just created a new project and have exactly the same error. I didn't change anything in the project.
npm install -g @angular/cli
ng new myapp
npm start
Angular CLI: 9.0.2
Node: 12.14.1
OS: win32 x64
Angular: 9.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.900.2
@angular-devkit/build-angular 0.900.2
@angular-devkit/build-optimizer 0.900.2
@angular-devkit/build-webpack 0.900.2
@angular-devkit/core 9.0.2
@angular-devkit/schematics 9.0.2
@angular/cli 9.0.2
@ngtools/webpack 9.0.2
@schematics/angular 9.0.2
@schematics/update 0.900.2
rxjs 6.5.4
typescript 3.7.5
webpack 4.41.2
Oh, I've got it. My issue is here https://github.com/angular/angular-cli/issues/9909 It was caused by symlinks.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.