Creating New Component throws error:PriorityQueue is not a constructor

In your package.json you will see:

"devDependencies": {
   "@angular-devkit/core": "OLD VERSION",  <----- once you run the command this will update
    ...
 }

Command to run the update:

npm i -D @angular-devkit/core@latest

Update your angular cli or make sure you are running the latest version of angular cli.

To install the latest version of angular cli use the command:

npm install -g @angular/cli@latest