使用typescript的function builder和handle builder中的Firebase部署错误
使用firebase云函数运行使用typescript的function builder和handle builder中的Firebase部署错误,typescript,firebase,npm,Typescript,Firebase,Npm,使用firebase云函数运行firebase deploy时,我遇到4个错误 错误来自我没有接触过的文件 node_modules/firebase-functions/lib/function-builder.d.ts:64:136 - error TS2707: Generic type 'Request<P>' requires between 0 and 1 type arguments. 64 onCall: (handler: (data: any,
firebase deploy
时,我遇到4个错误
错误来自我没有接触过的文件
node_modules/firebase-functions/lib/function-builder.d.ts:64:136 - error TS2707: Generic type 'Request<P>' requires between 0 and 1 type arguments.
64 onCall: (handler: (data: any, context: https.CallableContext) => any) => import("./cloud-functions").TriggerAnnotated & ((req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("express-serve-static-core").Query>, resp: express.Response<any>) => void) & import("./cloud-functions").Runnable<any>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/firebase-functions/lib/function-builder.d.ts:64:252 - error TS2694: Namespace '"/Users/harrisa/dev/apps/exerciser/functions/node_modules/@types/express-serve-static-core/index"' has no exported member 'Query'.
64 onCall: (handler: (data: any, context: https.CallableContext) => any) => import("./cloud-functions").TriggerAnnotated & ((req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("express-serve-static-core").Query>, resp: express.Response<any>) => void) & import("./cloud-functions").Runnable<any>;
~~~~~
node_modules/firebase-functions/lib/handler-builder.d.ts:21:36 - error TS2707: Generic type 'Request<P>' requires between 0 and 1 type arguments.
21 onRequest: (handler: (req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("express-serve-static-core").Query>, resp: express.Response<any>) => void) => HttpsFunction;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/firebase-functions/lib/handler-builder.d.ts:21:152 - error TS2694: Namespace '"/Users/harrisa/dev/apps/exerciser/functions/node_modules/@types/express-serve-static-core/index"' has no exported member 'Query'.
21 onRequest: (handler: (req: express.Request<import("express-serve-static-core").ParamsDictionary, any, any, import("express-serve-static-core").Query>, resp: express.Response<any>) => void) => HttpsFunction;
node_modules/firebase functions/lib/function builder.d.ts:64:136-错误TS2707:Generic type“Request”需要介于0和1之间的类型参数。
64 onCall:(handler:(data:any,context:https.CallableContext)=>any=>import(“./cloud函数”).TriggerAnnotated&((req:express.Request,resp:express.Response),特别是
向项目生成的函数/tsconfig.json添加skipLibCheck
我仍然认为这只是忽略了问题,但它现在起作用。回到稳定版本。
我做这个决定是为了解决它
"firebase-admin": "8.9.2",
"firebase-functions": "3.3.0",