我将我的角度项目9.0.7更新到9.1.9时最近出现错误

时间:2020-06-10 04:48:51

标签: node.js angular typescript generics angular9

最近,我遇到了一些错误。当我将我的角度项目9.0.7更新到9.1.9时。这次我遇到这种错误。


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

256     static ɵfac: ɵngcc0.ɵɵFactoryDef<ApplicationInitStatus, [{ optional: true; }]>;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:439:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

439     static ɵfac: ɵngcc0.ɵɵFactoryDef<ApplicationRef, never>;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:785:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

785     static ɵfac: ɵngcc0.ɵɵFactoryDef<Compiler, never>;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:5028:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

5028     static ɵfac: ɵngcc0.ɵɵFactoryDef<PlatformRef, never>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:6414:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

6414     static ɵfac: ɵngcc0.ɵɵFactoryDef<SystemJsNgModuleLoader, [null, { optional: true; }]>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:6611:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

6611     static ɵfac: ɵngcc0.ɵɵFactoryDef<Testability, never>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:6656:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

6656     static ɵfac: ɵngcc0.ɵɵFactoryDef<TestabilityRegistry, never>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@angular/core/core.d.ts:9555:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

9555     static ɵfac: ɵngcc0.ɵɵFactoryDef<ɵConsole, never>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../AppState/node_modules/@datorama/akita/lib/store.d.ts:138:18 - error TS2314: Generic type 'ɵɵFactoryDef' requires 1 type argument(s).

138     static ɵfac: ɵngcc0.ɵɵFactoryDef<Store<any>, never>;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

我不明白是什么问题。请帮忙。

2 个答案:

答案 0 :(得分:0)

删除并重新安装节点模块

更新您的角度CLI

ng update @angular/cli @angular/core)

和您的打字稿

npm install -g typescript@latest

答案 1 :(得分:0)

我在同一目录中有两个或更多个角度项目。我的另一个角度应用程序名称是AppState。这是我当前项目的外部。那里的依赖关系与我的项目有关,在这里我遇到了问题。

从依赖项获取此错误。我在这里用这个。 npm install @datorama/akita-ng-entity-service此语法。然后我得到了解决方案。