Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FunctionsError exported as a type only, but implementation exists #8511

Closed
ilyary opened this issue Sep 22, 2024 · 2 comments · Fixed by #8546 or Tech-FestivalDoJapao/Gerenciamento#35

Comments

@ilyary
Copy link

ilyary commented Sep 22, 2024

Operating System

macOS

Environment (if applicable)

vite@5

Firebase SDK Version

"firebase": "10.13.1", "@firebase/functions": "0.11.7"

Firebase SDK Product(s)

Functions

Project Tooling

vite@5

Detailed Problem Description

In my setup FunctionsError is resolved from ./node_modules/@firebase/functions/dist/functions-public.d.ts
image

And it's not a class although an implementation exist in the bundle ./node_modules/firebase/firebase-functions.js

Vite output:
Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/firebase_functions.js?v=bd8c5d40' does not provide an export named 'FunctionsError' (at callable.ts:3:3)

Could you pls export FunctionsError as class for better error handling?

Steps and code to reproduce issue

import { FirebaseError } from 'firebase/app';
import {
FunctionsError,
} from 'firebase/functions';

console.log({ FunctionsError });

@ilyary ilyary added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Sep 22, 2024
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@jbalidiong jbalidiong added api: functions needs-attention and removed needs-triage new A new issue that hasn't be categoirzed as question, bug or feature request labels Sep 23, 2024
@jbalidiong
Copy link
Contributor

Hi @ilyary, thanks for bringing this to our attention. I was able to reproduce the behavior. This feature is being tracked internally. I'll keep the ticket open until the feature is implemented or bug is fixed for visibility.

b/368936180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment