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

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?

About this issue

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

Commits related to this issue

Most upvoted comments

@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.

I’ll take a look.

This is still a problem indeed.

For instance: node_modules/@angular/common/common.d.ts(115,22): error TS-996002: Appears in the NgModule.imports of CoreModule, but could not be resolved to an NgModule class

EDIT: with version 8.2.0-next.0

Hello, I have the same problem

i 「wdm」: Compiling...
 93% after chunk asset optimization SourceMapDevToolPlugin main.js generate Source 93% after 
chunk asset optimization SourceMapDevToolPlugin polyfills.js generate S 93% after chunk asset 
optimization SourceMapDevToolPlugin runtime.js generate Sou 93% after chunk asset optimization 
SourceMapDevToolPlugin styles.js generate Sour 93% after chunk asset optimization 
SourceMapDevToolPlugin vendor.js generate Sour 93% after chunk asset optimization 
SourceMapDevToolPlugin polyfills.js generate S 93% after chunk asset optimization 
SourceMapDevToolPlugin runtime.js generate Sou 93% after chunk asset optimization 
SourceMapDevToolPlugin styles.js generate Sour 93% after chunk asset optimization 
SourceMapDevToolPlugin vendor.js generate Sour 93% after chunk asset optimization 
SourceMapDevToolPlugin main.js attach SourceMa
Date: 2019-07-10T13:43:03.940Z - Hash: 51aba17ea805a301a859
4 unchanged chunks
chunk {main} main.js, main.js.map (main) 302 kB [initial] [rendered]
Time: 2288ms
i 「wdm」: Compiled successfully.

    ERROR in node_modules/@syncfusion/ej2-angular-grids/src/grid/grid.module.d.ts(4,22): error 
    TS-996002: Appears in the NgModule.imports of **AppModule**, but could not be resolved to 
    an NgModule   class

my versions is

Angular CLI: 8.1.0
Node: 12.3.1
OS: win32 x64
Angular: 8.1.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.801.0
@angular-devkit/build-angular     0.801.0
@angular-devkit/build-optimizer   0.801.0
@angular-devkit/build-webpack     0.801.0
@angular-devkit/core              8.1.0
@angular-devkit/schematics        8.1.0
@ngtools/webpack                  8.1.0
@schematics/angular               8.1.0
@schematics/update                0.801.0
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.35.2

End my appModule … where is error i’dont know:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { GridModule, PageService, 
SortService, FilterService, GroupService } from '@syncfusion/ej2-angular-grids';

//import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NavExitComponent, NavHideComponent, NavEditComponent, NavJoinComponent, 
NavHelpComponent, NavL18nComponent, NavOpenComponent, NavSaveComponent, 
NavToolComponent, NavViewComponent, } from './public/components/nav';
import { DomSanitizerPipe } from './public/pipes/dom-sanitizer.pipe';


const routes: Routes = [
   { path: '', component: NavHelpComponent, outlet: 'nav'},
   { path: 'exit', component: NavExitComponent, outlet: 'nav'},
   { path: 'hide', component: NavHideComponent, outlet: 'nav'},
   { path: 'save', component: NavSaveComponent, outlet: 'nav'},
   { path: 'open', component: NavOpenComponent, outlet: 'nav'},
   { path: 'join', component: NavJoinComponent, outlet: 'nav'},
   { path: 'edit', component: NavEditComponent, outlet: 'nav'},
   { path: 'tool', component: NavToolComponent, outlet: 'nav'},
   { path: 'help', component: NavHelpComponent, outlet: 'nav'},
   { path: 'l18n', component: NavL18nComponent, outlet: 'nav'},
   { path: 'view', component: NavViewComponent, outlet: 'nav'},
];

@NgModule({
  declarations: [
    AppComponent,
    NavExitComponent,
    NavHideComponent,
    NavEditComponent,
    NavJoinComponent,
    NavHelpComponent,
    NavL18nComponent,
    NavOpenComponent,
    NavSaveComponent,
    NavToolComponent,
    NavViewComponent,
    DomSanitizerPipe
  ],
  imports: [BrowserModule, RouterModule.forRoot(routes), GridModule ],
  providers: [PageService, SortService, FilterService, GroupService ],
  bootstrap: [AppComponent]
})
export class AppModule { }

@naveedahmed1 This problem can have many different causes, could you please open a new issue with a reproduction so we can investigate?