I got a weird error while creating new component using Angular CLI,when I used ng g c navbar
it throws error:
core_1.PriorityQueue is not a constructor
TypeError: core_1.PriorityQueue is not a constructor
at new TaskScheduler (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular-devkit/schematics/src/engine/task.js:20:23)
at SchematicEngine.createContext (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular-devkit/schematics/src/engine/engine.js:81:31)
at SchematicImpl.call (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:38)
at Promise (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular/cli/tasks/schematic-run.js:73:23)
at new Promise (<anonymous>)
at Class.run (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular/cli/tasks/schematic-run.js:72:16)
at Class.run (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular/cli/commands/generate.js:161:33)
at resolve (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
at new Promise (<anonymous>)
at Class.validateAndRun (/home/praveen/Desktop/Angular_Projects/a2website/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
Can anyone help me?.Thanks in advance.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With