角度10错误-错误TS2314:通用类型'ɵɵFactoryDe​​f'需要1个类型参数

时间:2020-06-28 07:39:40

标签: angular

升级到角度10.0后,我在ng伺服上不断收到以下错误消息:

../ stocks/node_modules/@angular/core/core.d.ts:256:18中的错误-错误TS2314:通用类型'ɵɵFactoryDe​​f'需要1个类型参数。

256个静态ɵfac:ɵngcc0.ɵɵFactoryDe​​f; ../stocks/node_modules/@angular/core/core.d.ts:439:18-错误TS2314:通用类型'ɵɵFactoryDe​​f'需要1个类型参数。 439静态ɵfac:ɵngcc0.ɵɵFactoryDe​​f;

../ stocks/node_modules/@angular/core/core.d.ts:785:18-错误TS2314:通用类型'ɵɵFactoryDe​​f'需要1个类型参数。 785静态ɵfac:ɵngcc0.ɵɵFactoryDe​​f;

我尝试删除“ node_modules”文件夹,将npm cache clean --force和npm重新安装。我仍然收到此错误。

我在以下package.json中的依赖项:

“依赖项”:{ “ @ angular / animations”:“〜10.0.0”, “ @ angular / common”:“〜10.0.0”, “ @ angular / compiler”:“〜10.0.0”, “ @ angular / core”:“〜10.0.0”, “ @ angular / forms”:“〜10.0.0”, “ @ angular / platform-b​​rowser”:“〜10.0.0”, “ @ angular / platform-b​​rowser-dynamic”:“〜10.0.0”, “ @ angular / router”:“〜10.0.0”, “ rxjs”:“〜6.5.5”, “ tslib”:“ ^ 2.0.0”, “ zone.js”:“〜0.10.3” }, “ devDependencies”:{ “ @ angular-devkit / build-angular”:“〜0.1000.0”, “ @ angular / cli”:“〜10.0.0”, “ @ angular / compiler-cli”:“〜10.0.0”, “ @ types / node”:“ ^ 12.11.1”, “ @ types /茉莉花”:“〜3.5.0”, “ @ types / jasminewd2”:“〜2.0.3”, “ codelyzer”:“ ^ 6.0.0-next.1”, “茉莉花芯”:“〜3.5.0”, “ jasmine-spec-reporter”:“〜5.0.0”, “ karma”:“〜5.0.0”, “ karma-chrome-launcher”:“〜3.1.0”, “业力报废的伊斯坦布尔记者”:“〜3.0.2”, “业力茉莉花”:“〜3.3.0”, “ karma-jasmine-html-reporter”:“ ^ 1.5.0”, “量角器”:“〜7.0.0”, “ ts-node”:“〜8.3.0”, “ tslint”:“〜6.1.0”, “ typescript”:“〜3.9.5” }

如何摆脱这个错误?

0 个答案:

没有答案