[FIXED] Angular structure loaded both synchronously and asynchronously when adding primeng tableModule

Issue

I had the following error when loading TableModule from primeng into my components module file and trying to run ‘npm run packagr’:

Maximum call stack size exceeded

I found this solution, to change my primeng version primeng12 to primeng11.4.5. So I did that, but now I am getting the following error:

Angular structure loaded both synchronously and asynchronously

This is my components module file:

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HeaderComponent } from './header.component';
import { TableModule } from 'primeng/table';

@NgModule({
  declarations: [HeaderComponent],
  imports: [CommonModule, TableModule],
  exports: [HeaderComponent],
})
export class HeaderModule {} //RED LINE APPEARS HERE UNDER HEADERMODULE, BUT NOWHERE ELSE

Does anyone have any ideas how I can fix this?

Solution

Fixed this by changing prime ng version to 9.1.3 and installing angular cdk

Answered By – Pippa97

Answer Checked By – Gilberto Lyons (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published