首页 > 解决方案 > angular 8 flex-layout 8 错误:没有导出成员 ɵNgClassImpl 错误

问题描述

我有 angular 8 项目并尝试安装 flex-layout 8.0.0-beta.26。我在构建时收到此错误。

ERROR in node_modules/@angular/flex-layout/extended/typings/class/class.d.ts(9,19): error TS2305: Module '"C:/Users/user/Desktop/Project/node_modules/@angular/common/common"' has no exported member 'ɵNgClassImpl'.
node_modules/@angular/flex-layout/extended/typings/class/class.d.ts(9,33): error TS2305: Module '"C:/Users/user/Desktop/Project/node_modules/@angular/common/common"' has no exported member 'ɵNgClassR2Impl'.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(9,19): error TS2305: Module '"C:/Users/user/Desktop/project/node_modules/@angular/common/common"' has no exported member 'ɵNgStyleImpl'.
node_modules/@angular/flex-layout/extended/typings/style/style.d.ts(9,33): error TS2305: Module '"C:/Users/user/Desktop/project/node_modules/@angular/common/common"' has no exported member 'ɵNgStyleR2Impl'.

他是我的 package.json 依赖项:

"dependencies": {
    "@angular/animations": "^7.2.15",
    "@angular/cdk": "^8.1.4",
    "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "^8.2.3",
    "@angular/flex-layout": "^8.0.0-beta.26",
    "@angular/forms": "~7.2.0",
    "@angular/material": "^8.1.4",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",
    "core-js": "^2.5.4",
    "hammerjs": "^2.0.8",
    "rxjs": "~6.3.3",
    "tslib": "^1.9.0",
    "zone.js": "~0.8.26"
  }

任何人都可以解释为什么会这样吗?

标签: angularnpm

解决方案


试试这个命令:

npm install @angular/flex-layout@7.0.0-beta.24

推荐阅读