question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ivy preview report: error TS-996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class

See original GitHub issue

Hi! I try to build another compex project with Ivy and get an error:

ERROR in node_modules/ng6-breadcrumbs/lib/breadcrumbs.module.d.ts(1,22): error TS-996002: Appears in the NgModule.imports of AppModule,
 but could not be resolved to an NgModule class

image All libs from NPM: https://www.npmjs.com/package/ng6-breadcrumbs

Angular CLI: 8.0.0
Node: 11.14.0
OS: win32 x64
Angular: 8.1.0-next.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0
@angular-devkit/build-angular     0.800.0
@angular-devkit/build-optimizer   0.800.0
@angular-devkit/build-webpack     0.800.0
@angular-devkit/core              7.3.9
@angular-devkit/schematics        7.3.9
@angular/cli                      8.0.0
@angular/http                     7.2.13
@angular/pwa                      0.13.9
@ngtools/webpack                  8.0.0
@schematics/angular               7.3.9
@schematics/update                0.800.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0
@NgModule({
  declarations: [
    AppComponent,
    LoginComponent,
    NotFoundComponent,
    PublicComponent,
    PrivateComponent,
    HomeComponent,
    SidebarComponent,
    MobileSidebarToggleDirective,
    MobileSidebarCloseDirective,
    SidebarToggleDirective,
    SidebarCloseDirective,
    CloseDirective
  ],
  imports: [
    BrowserModule,
    ReactiveFormsModule,
    NgxPaginationModule,
    BreadcrumbsModule,
    HttpClientModule,
    /*Ng4LoadingSpinnerModule.forRoot(),*/
    NgxUiLoaderModule.forRoot({delay: 1500, maxTime: 10000}),
    // NgxUiLoaderHttpModule.forRoot({ delay: 1500, maxTime: 10000 }), // for Http module only
    AppRoutingModule,
    ServiceWorkerModule.register('ngsw-worker.js', {enabled: environment.production})
  ],
  providers: [
    {provide: HTTP_INTERCEPTORS, useClass: RequestInterceptorService, multi: true}
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}

Whats wrong?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
petebacondarwincommented, Jul 24, 2019

@Phil147 - just to be clear, building libraries with IVY mode is not yet supported. You should still build your library with ViewEngine mode and publish it with ngpackagr. Then only run ngcc on the published package when it is being consumed in an app.

3reactions
petebacondarwincommented, Jul 24, 2019

I’ll take a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appears in the NgModule.imports of AppModule, but could not ...
This error shows when you add component declaration in imports: [] instead ... MyService // should add here ] }) export class AppModule...
Read more >
IVY Error NG6002: Appears in the NgModule.imports ... - GitHub
IVY Error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class #35399.
Read more >
Answer: error NG6002: Appears in the NgModule.imports of ...
imports of AppModule, but could not be resolved to an NgModule class. Feb 18 '20. 3. Fixed it by opting out of Ivy...
Read more >
Angular 8 ivy Error "Could not be resolved to an NgModule ...
When building an application with the DayPilot Scheduler (version: 2019.3.3903) and "angularCompilerOptions": { "enableIvy": true }
Read more >
error NG6002 - Angular - CodeDocu.com
Angular Error NG6002 Appears the NgModule imports of AppModule but could not be resolved to class at node modules common http 81 22...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found