Exact Error Message:
No overload matches this call. Overload 1 of 2, '(version: "v3"): Calendar', gave the following error. Argument of type '{ version: string; auth: JSONClient | Compute; }' is not assignable to parameter of type '"v3"'. Overload 2 of 2, '(options: Options): Calendar', gave the following error. Type 'JSONClient | Compute' is not assignable to type 'string | BaseExternalAccountClient | OAuth2Client | GoogleAuth<JSONClient> | undefined'. Type 'ExternalAccountAuthorizedUserClient' is not assignable to type 'string | BaseExternalAccountClient | OAuth2Client | GoogleAuth<JSONClient> | undefined'. Type 'ExternalAccountAuthorizedUserClient' is missing the following properties from type 'OAuth2Client': certificateCache, certificateExpiry, certificateCacheFormat, refreshTokenPromises, and 27 more.
I faced same issue recently with google calender api (freebusy) when I try to authenticate with google service account.
npm ls google-auth-library output is as follows
Any help is appreciated. Thanks
Exact Error Message:
No overload matches this call. Overload 1 of 2, '(version: "v3"): Calendar', gave the following error. Argument of type '{ version: string; auth: JSONClient | Compute; }' is not assignable to parameter of type '"v3"'. Overload 2 of 2, '(options: Options): Calendar', gave the following error. Type 'JSONClient | Compute' is not assignable to type 'string | BaseExternalAccountClient | OAuth2Client | GoogleAuth<JSONClient> | undefined'. Type 'ExternalAccountAuthorizedUserClient' is not assignable to type 'string | BaseExternalAccountClient | OAuth2Client | GoogleAuth<JSONClient> | undefined'. Type 'ExternalAccountAuthorizedUserClient' is missing the following properties from type 'OAuth2Client': certificateCache, certificateExpiry, certificateCacheFormat, refreshTokenPromises, and 27 more.