Error NG6002 on Angular 9 with Ivy
See original GitHub issueBeen getting this error while compiling with angular 9 with Ivy enabled:
ERROR in Failed to compile entry-point @ngx-loading-bar/http-client (es2015 as esm2015) due to compilation errors:
../../node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6002: Appears in the NgModule.imports of LoadingBarHttpClientModule, but could not be resolved to an NgModule class
2801 export declare class HttpClientModule {
~~~~~~~~~~~~~~~~
../../node_modules/@angular/common/http/http.d.ts:2801:22 - error NG6003: Appears in the NgModule.exports of LoadingBarHttpClientModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
2801 export declare class HttpClientModule {
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:15 (4 by maintainers)
Top Results From Across the Web
IVY Error NG6002: Appears in the NgModule.imports ... - GitHub
After disabling IVY, our real app successfully builds in AOT (prod mode) using Angular 9.0.1, so the issue seems to be an Angular...
Read more >Angular error NG6002: Appears in the NgModule.imports of ...
This likely means that the library (@angular/material/dialog) which declares MatDialog has not been processed correctly by ngcc, or is not ...
Read more >Answer: error NG6002: Appears in the NgModule.imports of ...
Fixed it by opting out of Ivy as per documentation. https://angular.io/guide/ivy. Change tsconfig.app.json to opt out of Ivy.
Read more >Appears in the NgModule.imports of AppModule, but could not ...
Angular Error: error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
Read more >Angular pro module error - Material Design for Bootstrap
ts:9:22 - error NG6002: Appears in the NgModule.imports of MdbTimePickerModule, but could not be resolved to an NgModule class. This likely means that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ricardosaracino are you sure you’re compiling with Ivy enabled? This problem is about Ivy. Without Ivy it works for me too. Try with
"enableIvy": true
intsconfig.json/angularCompilerOptions
@aitboudad I’ve seen your commit, but the
>=7.0.0
peer dependency range would already match angular 9 so I don’t see much help with that. Also you didn’t seem to updateng-packagr
which people pointed out to solving the problem in other packages. Is there any reason for that?5.0.0-alpha.1
did not solve the issue for me on Ivy.let me know if this works on your side to release a stable release (
v5
) asap.