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

Imports #1619

Open
jmc420 opened this issue Sep 18, 2024 · 2 comments
Open

Imports #1619

jmc420 opened this issue Sep 18, 2024 · 2 comments

Comments

@jmc420
Copy link

jmc420 commented Sep 18, 2024

Related issues

[REQUIRED] Version info

node: v22.6.0

firebase-functions: 6.0.1

firebase-tools: 13.17.9

firebase-admin: 12.5.0

In firebase-functions 3.13.2 I was able to import using typescript thus:

import * as functions from 'firebase-functions';
import { UserRecord } from 'firebase-functions/lib/providers/auth';

These import statements do not work with firebase-functions 6.0.1

I get these errors:

error TS2307: Cannot find module 'firebase-functions' or its corresponding type declarations.

import * as functions from 'firebase-functions';

error TS2307: Cannot find module 'firebase-functions/lib/providers/auth' or its corresponding type declarations.

import { UserRecord } from 'firebase-functions/lib/providers/auth';

There are examples using require e.g. const functions = require("firebase-functions/v1");

Is it possible to use import with firebase-functions 6.0.1?

How do I import the type definition of UserRecord?

@google-oss-bot
Copy link
Collaborator

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@davie-robertson
Copy link

#1614 (comment)

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

No branches or pull requests

3 participants