Bennett(he/him) Posted on May 25, 2020 Answer: error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class answer re: error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class Feb 18 '20 19 Fixed it by opting out of Ivy as per documentation. https://angular.io/guide/ivy Change tsconfig.app.json to opt out of Ivy. "enableIvy": false Open Full Answer Top comments (2) Subscribe Submit Preview Dismiss Collapse Expand Raj Sekhar Raj Sekhar Raj Sekhar Follow Looking for new opportunities in Angular developement. I have 4+ exp. Email krj2033@gmail.com Location Chennai, india Education B.E in Electronics & Communication Work Front-end developer at Tcs Joined Jun 7, 2019 • Mar 3 '21 Dropdown menu Copy link Hide For anyone who is landing to this for the same error. The error also happens when imports are wrong. I was using V-11 Angular. stackoverflow.com/a/64118560/6166406 Collapse Expand algorusa algorusa algorusa Follow Joined Aug 23, 2023 • Aug 23 '23 • Edited on Aug 23 • Edited Dropdown menu Copy link Hide what worked for me(rom ang 11 to ang 15 migration): modify angular.json as configurations: { ... aot: false, buildOptimizer: false, ... } Code of Conduct • Report abuse
Top comments (2)
For anyone who is landing to this for the same error.
The error also happens when imports are wrong. I was using V-11 Angular.
stackoverflow.com/a/64118560/6166406
what worked for me(rom ang 11 to ang 15 migration): modify angular.json as
configurations: {
...
aot: false,
buildOptimizer: false,
...
}