0

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?

Pippa97
  • 79
  • 1
  • 12
  • Is this the same issue as https://stackoverflow.com/questions/67214967/how-to-fix-error-angular-structure-loaded-both-synchronously-and-asynchronousl – Drenai Oct 31 '21 at 20:10
  • @Drenai yes same error, but I tried all those solutions and non of them worked for me – Pippa97 Oct 31 '21 at 20:11
  • You don't have much details of what you've tried in the question – Drenai Oct 31 '21 at 20:14
  • Does this answer your question? [How to fix: Error: Angular structure loaded both synchronously and asynchronously](https://stackoverflow.com/questions/67214967/how-to-fix-error-angular-structure-loaded-both-synchronously-and-asynchronousl) – Evgeny Bovykin Nov 02 '21 at 14:59

1 Answers1

0

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

Pippa97
  • 79
  • 1
  • 12