node.js - 我最近在将 Angular 项目 9.0.7 更新到 9.1.9 时遇到错误
问题描述
最近,我遇到了一些错误。当我将我的 Angular 项目 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/ **
我不明白是什么问题。请帮忙。
解决方案
删除并重新安装您的节点模块
更新你的角度 CLI
ng update @angular/cli @angular/core)
和你的打字稿
npm install -g typescript@latest
推荐阅读
- kubernetes - 使用 Kind: deployment 限制 Kubernetes 中 Pod 的首次部署
- java - Java内存模型和局部变量
- r - R中的system/system2命令
- go - go 1.16 embed - 去除目录名
- flutter - flutter/cloud firestore:如何从文档中只获取一个数据?
- css - SVG 在 WP Elementor 中有两种颜色作为徽标
- java - 为什么我使用 Netty 在此端口上创建了 UDP 监视器时端口的状态未侦听?
- javascript - 进行更改时,如何更新我的 serviceworker 脚本以更新缓存页面?
- javascript - Javascript XMLHTTPRequest 使用标头中未定义的协议发送
- python - 记录加速度计(X、Y 和 Z)读数的特定运动模式