Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Building with TypeScript fails: Types of property 'authClient' are incompatible. #1853

@galah92

Description

@galah92

Environment details

  • OS: WSL2
  • Node.js version: v14.18.3
  • npm version: 8.5.3
  • @google-cloud/storage version: 5.19.0

Steps to reproduce

I'm getting the following errors while updating from 5.18.3 to 5.19.0:

node_modules/@google-cloud/common/build/src/util.d.ts:42:18 - error TS2430: Interface 'MakeAuthenticatedRequestFactoryConfig' incorrectly extends interface 'GoogleAuthOptions<JSONClient>'.
  Types of property 'authClient' are incompatible.
    Type 'GoogleAuth<JSONClient> | undefined' is not assignable to type 'JSONClient | undefined'.
      Type 'GoogleAuth<JSONClient>' is not assignable to type 'JSONClient | undefined'.
        Type 'GoogleAuth<JSONClient>' is missing the following properties from type 'JWT': createScoped, getRequestMetadataAsync, fetchIdToken, hasUserScopes, and 53 more.

42 export interface MakeAuthenticatedRequestFactoryConfig extends GoogleAuthOptions {
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@google-cloud/common/build/src/service.d.ts:29:18 - error TS2430: Interface 'ServiceOptions' incorrectly extends interface 'GoogleAuthOptions<JSONClient>'.
  Types of property 'authClient' are incompatible.
    Type 'GoogleAuth<JSONClient> | undefined' is not assignable to type 'JSONClient | undefined'.

29 export interface ServiceOptions extends GoogleAuthOptions {
                    ~~~~~~~~~~~~~~


Found 2 errors.

Worth to say I am initializing the client without any explicit authentication.

Thanks!

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/nodejs-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions