I'm using PrimeNG 11 with angular 11 as per this configuration:
"dependencies": {
"@angular/animations": "^11.2.2",
"@angular/cdk": "^11.2.1",
"@angular/common": "^11.2.2",
"@angular/compiler": "^11.2.2",
"@angular/core": "^11.2.2",
"@angular/forms": "^11.2.2",
"@angular/platform-browser": "^11.2.2",
"@angular/platform-browser-dynamic": "^11.2.2",
"@angular/router": "^11.2.2",
"@auth0/angular-jwt": "^5.0.2",
"bootstrap": "^5.0.0-beta2",
"primeicons": "^4.1.0",
"primeng": "^11.2.3",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"typescript-map": "^0.1.0",
"zone.js": "^0.10.3" }
After importing the module & service to use the confirm dialog component we got an error
This likely means that the library (primeng/api) which declares ConfirmationService has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is a
vailable, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
The import lines
import {ConfirmDialogModule} from 'primeng/confirmdialog'; import {ConfirmationService} from 'primeng/api';
I tried
- Delete node-modules and run npm update
- Adding this line to scripts in package.json ["postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"]
None of these worked with me.
Can somebody please help with this ?