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
Using current latest firebase-tools, a freshly-created TypeScript functions project fails to build with type errors in google-gax.
[REQUIRED] Steps to reproduce
mkdir test-project
cd test-project
firebase init functions
<follow prompts and pick TypeScript>cd functions
npm run build
[REQUIRED] Expected behavior
The project builds
[REQUIRED] Actual behavior
tsc fails with:
node_modules/google-gax/build/src/clientInterface.d.ts:7:18 - error TS2320: Interface 'ClientOptions' cannot simultaneously extend types 'GrpcClientOptions' and 'GoogleAuthOptions'.
Named property 'auth' of types 'GrpcClientOptions' and 'GoogleAuthOptions' are not identical.
7 export interface ClientOptions extends GrpcClientOptions, GoogleAuthOptions, ClientStubOptions {
~~~~~~~~~~~~~
node_modules/google-gax/build/src/grpc.d.ts:24:18 - error TS2430: Interface 'GrpcClientOptions' incorrectly extends interface 'GoogleAuthOptions'.
Types of property 'auth' are incompatible.
Type 'GoogleAuth | undefined' is not assignable to type 'AuthClient | undefined'.
Type 'GoogleAuth' is missing the following properties from type 'AuthClient': on, credentials, eagerRefreshThresholdMillis, forceRefreshOnFailure, and 16 more.
24 export interface GrpcClientOptions extends GoogleAuthOptions {
~~~~~~~~~~~~~~~~~
src/index.ts:1:1 - error TS6133: 'functions' is declared but its value is never read.
1 import * as functions from "firebase-functions";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 3 errors.
The last error is expected, given that this is a fresh empty project, but I can't seem to fix the first two. Seems like this may be an upstream issue with whatever version of google-gax is getting pulled, but I see nothing in their repo about it.
The text was updated successfully, but these errors were encountered:
It looks like the upstream issue has been fixed. I confirmed locally that a newly initialized TS functions project don't have tsc issue described in the OP.
[REQUIRED] Environment info
firebase-tools: 10.2.0
Platform: macOS
[REQUIRED] Test case
Using current latest firebase-tools, a freshly-created TypeScript functions project fails to build with type errors in
google-gax
.[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
The project builds
[REQUIRED] Actual behavior
tsc
fails with:The last error is expected, given that this is a fresh empty project, but I can't seem to fix the first two. Seems like this may be an upstream issue with whatever version of
google-gax
is getting pulled, but I see nothing in their repo about it.The text was updated successfully, but these errors were encountered: