I am getting 4 errors when running firebase deploy
using firebase cloud functions.
The errors are coming from files that I have not touched.
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;
I have tried updating firebase functions and firebase admin npm packages but the errors still persist.
The errors came about after removing a few packages from npm. However, I reverted my changes in git back to a point where it was working, but the errors are still there. Any help would be much appreciated
EDIT:
I managed to fix the issue following this question and in-particular Adding skipLibCheck to the project's generated functions/tsconfig.json
I still think this is just ignoring the problem, but it works for now.