我正在运行此npm
命令来生成新组件
ng g c servers
我遇到以下错误:
core_1.PriorityQueue is not a constructor TypeError: core_1.PriorityQueue is not a constructor
at new TaskScheduler (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular-devkit/schematics/src/engine/task.js:20:23)
at SchematicEngine.createContext (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular-devkit/schematics/src/engine/engine.js:81:31)
at SchematicImpl.call (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular-devkit/schematics/src/engine/schematic.js:35:38)
at Promise (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular/cli/tasks/schematic-run.js:73:23)
at new Promise (<anonymous>)
at Class.run (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular/cli/tasks/schematic-run.js:72:16)
at Class.run (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular/cli/commands/generate.js:161:33)
at resolve (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular/cli/ember-cli/lib/models/command.js:261:20)
at new Promise (<anonymous>)
at Class.validateAndRun (/Users/almashrgy/Documents/Development/second-app/node_modules/@angular/cli/ember-cli/lib/models/command.js:240:12)
Mohameds-MacBook-Pro:second-app almashrgy$
答案 0 :(得分:0)
检查此链接。通过在devDependencies中使用0.0.29版的devkit-core,可以解决此问题。