通用类型'ɵɵFactoryDe​​f'需要2个类型参数

时间:2020-06-18 14:24:32

标签: javascript angular typescript angular-ivy

如标题中所述,在构建我的角度应用程序时遇到了此类问题:

ERROR in node_modules/@angular/core/core.d.ts:219:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 2 type argument(s).

我尝试过更新角度,降级,重置node_modules等。类似的帖子here并没有解决。

我确定这是微不足道的,但我指望社区提供慷慨的帮助?

这是我的ng --version结果:

Angular CLI: 9.1.9
Node: 12.12.0
OS: win32 x64

Angular: 9.1.11
... core
Ivy Workspace: Yes

Package                             Version
-------------------------------------------------------------
@angular-devkit/architect           0.901.9
@angular-devkit/build-angular       0.901.9
@angular-devkit/build-optimizer     0.901.9
@angular-devkit/build-webpack       0.901.9
@angular-devkit/core                9.1.9
@angular-devkit/schematics          9.1.9
@angular/cli                        9.1.9
@angular/common                     9.0.4
@angular/compiler                   9.0.4
@angular/compiler-cli               9.0.4
@angular/forms                      9.0.4
@angular/language-service           9.0.4
@angular/platform-browser           9.0.4
@angular/platform-browser-dynamic   9.0.4
@angular/router                     9.0.4
@ngtools/webpack                    9.1.9
@schematics/angular                 9.1.9
@schematics/update                  0.901.9
rxjs                                6.5.4
typescript                          3.7.5
webpack                             4.42.0

以及 package.json 中的@angular依赖项:

  "dependencies": {
    "@angular/common": "~9.0.3",
    "@angular/compiler": "~9.0.3",
    "@angular/core": "^9.1.11",
    "@angular/forms": "~9.0.3",
    "@angular/platform-browser": "~9.0.3",
    "@angular/platform-browser-dynamic": "~9.0.3",
    "@angular/router": "~9.0.3", 

感谢您的帮助!

0 个答案:

没有答案