Angular 8: Problems with QueryParamsHandling

Viewed 1387

I'm trying to make a table with PrimeNG and after made the import in the module file

import {TableModule} from 'primeng/table';

I have the next error:

node_modules/primeng/api/megamenuitem.d.ts(30,27): error TS2304: Cannot find name 'QueryParamsHandling'.
node_modules/primeng/api/menuitem.d.ts(1,10): error TS2305: Module '"../../@angular/router/router"' has no exported member 'QueryParamsHandling'.

I have searched in google and in the community and I haven't found any solutions

Please. Could anybody help me? Many thanks in advance Regards

1 Answers

There is a mismatch between the Angular version and the PrimeNG version. You are using Angular 8, and PrimeNG version 7. Run the following commands

npm uninstall primeng
npm install primeng@8.0.1

Should fix it.

Related