Uncaught TypeError: Class constructor Platform cannot be invoked without 'new'

Haagii95 Tugs picture Haagii95 Tugs · Jun 26, 2020 · Viewed 7.3k times · Source

I've installed the Angular CDK in order to use PrimeNG's dropdown component but it throws an error.

I've added this in my app.module.ts:

import {DropdownModule} from 'primeng/dropdown';

And installed the Angular CDK by simply typing in the following:

npm install @angular/cdk --save

Answer

Gennaro Schiano picture Gennaro Schiano · Jun 26, 2020

I had the same issue. Check your cdk version in your package.json

I solved installing an older version of cdk 10:

npm i @angular/[email protected] --save