You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
This repository was archived by the owner on Nov 20, 2025. It is now read-only.
GoogleAuth can no longer be used with googleapis: Type 'GoogleAuth<JSONClient>' is not assignable to type 'string | OAuth2Client | BaseExternalAccountClient | GoogleAuth<JSONClient> | undefined' #1402
After updating google-auth-library-nodejs from v7.14.1 to v8.0.1, the following Typescript compile error occurs:
Type 'GoogleAuth<JSONClient>' is not assignable to type 'string | OAuth2Client | BaseExternalAccountClient | GoogleAuth<JSONClient> | undefined'.
Type 'import(".../node_modules/google-auth-library/build/src/auth/googleauth").GoogleAuth<import(".../node_modules/google-auth-library/build/src/auth/googleauth").JSONClient>' is not assignable to type 'import(".../node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth").GoogleAuth<import(".../node_modules/google-gax/node_modules/google-auth-library/build/src/auth/googleauth").JSONClient>'.
Types have separate declarations of a private property 'checkIsGCE'.
Environment details
OS: Windows
Node.js version: v16.14.2
npm version: v8.7.0
google-auth-library version: v8.0.1
Steps to reproduce
Use the same code as previously
import{google}from'googleapis'import{GoogleAuth}from'google-auth-library'functionsetCredentials(): void{constclient=newGoogleAuth({scopes: ['https://www.googleapis.com/auth/cloud-billing','https://www.googleapis.com/auth/cloud-platform'],})google.options({auth: client,// Error is emmitted for this line after updating google-auth-library-nodejs to v8})}