NG6002: Appears in the NgModule.imports of AppModule, but itself has errors

Viewed 20

I am upgrading my angualr from 6 to 13.0.2. When I do ng build , I get an error:

NG6002: Appears in the NgModule.imports of AppModule, but itself has errors 33 export class AdminModule { }

I am sure, Admin module imports doesn't include any components, all components are part of declarations: []

Not sure what the error is related to. I also upgarded angualr material to 13.0.2. I tried to setenableIvy to false in tsconfig.app.json.

"angularCompilerOptions": { "enableIvy" : false,

admin.module.ts

import { CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { CommonModule } from '@angular/common';
import {MatRadioModule} from '@angular/material/radio';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { NgxSpinnerModule } from 'ngx-spinner';
import { MatNativeDateModule } from '@angular/material/core';
import { MaterialModule } from 'src/app/material/material.module';

@NgModule({
  imports: [
     CommonModule,
     MaterialModule,
    MatRadioModule,
     ReactiveFormsModule,
     FormsModule,
     NgxSpinnerModule,
     MatNativeDateModule
  ],
  declarations: [AdminComponent],
  
  schemas: [CUSTOM_ELEMENTS_SCHEMA]

})
export class AdminModule { }

app.module.ts

@NgModule({
  declarations: [AppComponent, LoginComponent, HomeComponent],
  imports: [
   AdminModule,
    NgxSpinnerModule,
    MatDialog,
    NgxSliderModule
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
 ,
  providers: [
    
  ],
    
  bootstrap: [AppComponent],

})



export class AppModule {}
0 Answers
Related