I've been diligently working on an Angular application that heavily relies on PrimeNG as the UI component framework. Initially, I had no issues deploying my app with Angular version 9 and PrimeNG version 8. However, a while ago, I decided to upgrade to PrimeNG version 10.0.5-rc1 due to enticing new features. Development progressed smoothly until I attempted to build my Angular application in production mode - every PrimeNG component triggered errors. Additionally, when trying to access components from shared modules, Angular couldn't seem to locate them in production mode. Below is a snippet of the type of errors encountered:
35 templateUrl: './reservation.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component ReservationComponent.
src/app/modules/sales/modules/pos/menus/home/reservations/reservation/reservation.component.html:390:65 - error NG8002: Can't bind to 'showCloseIcon' since it isn't a known property of 'p-overlayPanel'.
1. If 'p-overlayPanel' is an Angular component and it has 'showCloseIcon' input, then verify that it is part of this module.
2. If 'p-overlayPanel' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
390 <p-overlayPanel #deletePaymentOverlayModal [dismissable]="true" [showCloseIcon]="true">
src/app/modules/sales/modules/pos/menus/home/reservations/reservation/reservation.component.ts:35:16
35 templateUrl: './reservation.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component ReservationComponent.
src/app/modules/shared/pos/reservation-components/create-reservation/create-reservation.component.html:3:1 - error NG8001: 'app-create-edit-reservation' is not a known element:
1. If 'app-create-edit-reservation' is an Angular component, then verify that it is part of this module.
2. If 'app-create-edit-reservation' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3 <app-create-edit-reservation></app-create-edit-reservation>
To address these issues, I have upgraded PrimeNG to its latest version, which is now at 11.0.0-rc1. Furthermore, both my Angular and Angular CLI versions have also been updated.
I'm seeking guidance on how to resolve these challenges. Any assistance would be greatly appreciated.