Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class in angular 8

restart your server...

terminate server for windows

ctrl + C

start again

ng serve

I had the same issue.
I was going through comments here https://github.com/angular/angular/issues/35399 for solution.

I simple ran ng serve --prodand the error was gone. After that I even ran ng serve.
Other solutions proposed are

  • Ensure that the tsconfig.json of your library has set "importHelpers": true
  • Add "enableIvy": false to compilerOptions in tsconfig.app.json

Simply restart the server (press ctrl+c on the prompt) and then, run ng serve again.

I had the same issue. Then I realized that previously I've some changes in app.module.ts Every time you made changes in app.module.ts remember restart the server process.

Tags:

Angular8