突然出现这个错误:
TypeScript: ./..\..\node_modules\@types\ws\index.d.ts:328:18
Type 'Server' is not generic.
Angular CLI: 13.3.11
Node: 16.13.2
Package Manager: npm 8.1.2
OS: win32 x64
Angular: 13.4.0
... common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker
Package Version
@angular-devkit/architect 0.1303.11
@angular-devkit/build-angular 13.3.11
@angular-devkit/core 13.3.11
@angular-devkit/schematics 13.3.11
@angular/cli 13.3.11
@angular/pwa 13.3.11
@schematics/angular 13.3.11
rxjs 6.6.7
typescript 5.1.3
已尝试将@types/ws更新到版本^8.13.0,但未成功
1条答案
按热度按时间lyr7nygr1#
我花了两天时间更新和降级@types/node和@types/express。最后,我将我的Angular 项目从14更新到15,一切又完美地工作了。