无法生成库。无效的规则结果:class Promise 的实例

Cannot generate library. Invalid rule result: Instance of class Promise

当 运行 ng generate library mylib

我收到以下错误:

Invalid rule result: Instance of class Promise.

我认为这是一个包裹问题,但我不知道如何找到导致问题的原因。

这是我的 package.json

{
  "dependencies": {
    "@angular/animations": "~7.2.12",
    "@angular/cdk": "^7.3.7",
    "@angular/common": "~7.2.12",
    "@angular/compiler": "~7.2.12",
    "@angular/core": "~7.2.12",
    "@angular/flex-layout": "^7.0.0-beta.23",
    "@angular/forms": "~7.2.12",
    "@angular/material": "^7.3.7",
    "@angular/platform-browser": "~7.2.12",
    "@angular/platform-browser-dynamic": "~7.2.12",
    "@angular/router": "~7.2.12",
    "core-js": "^2.5.4",
    "hammerjs": "^2.0.8",
    "ngx-infinite-scroll": "^7.1.0",
    "oidc-client": "~1.6.1",
    "rxjs": "~6.4.0",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26",
    "@nrwl/angular": "^8.1.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.13.0",
    "@angular/cli": "^7.3.8",
    "@angular/compiler-cli": "~7.2.12",
    "@angular/language-service": "~7.2.12",
    "@nrwl/workspace": "8.1.2",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~5.0.1",
    "dotenv": "6.2.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.0.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "^3.2.4"
  }
}

npm 版本 6.9.0

节点版本 10.16.0

如果您还需要什么,请告诉我。谢谢!

我通过更新 angular-cli 的全球版本解决了这个问题。

npm install -g @angular/cli