0

我做了什么:我使用 升级nest js nest update -f -t latest,包版本差异如下。

"@nestjs/bull": "^0.1.1",
"@nestjs/common": "^7.0.7",
"@nestjs/core": "^7.0.7",
"@nestjs/graphql": "^7.3.7",
"@nestjs/platform-fastify": "^7.0.7",
"@nestjs/schedule": "^0.4.0",
"@nestjs/typeorm": "^7.0.0",

"@nestjs/bull": "^0.3.0",
"@nestjs/common": "^7.5.4",
"@nestjs/core": "^7.5.4",
"@nestjs/graphql": "^7.8.2",
"@nestjs/platform-fastify": "^7.5.4",
"@nestjs/schedule": "^0.4.1",
"@nestjs/typeorm": "^7.1.5",

(js 版本:NodeJS 14.15.1 / TypeScript 4.0.5)

升级后,当我使用nestjs v7.5.4 & fastify platform v7.5.4 启动nestjs 服务器时,我得到了

node_modules/@nestjs/platform-fastify/adapters/fastify-adapter.d.ts:21:315 - error TS2707: Generic type 'FastifyRequest<RouteGeneric, RawServer, RawRequest, HttpRequest, Query, Params, Headers, Body>' requires between 4 and 8 type arguments.
21 export declare class FastifyAdapter<TServer extends RawServerBase = RawServerDefault, TRawRequest extends RawRequestDefaultExpression<TServer> = RawRequestDefaultExpression<TServer>, TRawResponse extends RawReplyDefaultExpression<TServer> = RawReplyDefaultExpression<TServer>> extends AbstractHttpAdapter<TServer, FastifyRequest<RequestGenericInterface, TServer, TRawRequest>, FastifyReply<TServer, TRawRequest, TRawResponse>> {

但是这个错误来自 node_modules@nestjs/platform-fastify 所以我不能真正触摸代码......
有没有办法避免这个错误......?

4

0 回答 0