question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing export for functions and getFuncitons

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

Windows, Node.js Firebase SDK version: latest firebase-admin = 10.2.0 Firebase Product: Cloud Functions (+ Auth, Firestore,…) Node.js version: 16 NPM version: 8.1.0

[REQUIRED] Step 3: Describe the problem

I want to use TaskQueue with Cloud Functions as described here https://firebase.google.com/docs/functions/task-functions, but neither firebase-functions SDK v3.21.1 nor firebase-admin SDK v10.2.0 has export for all described functions. There is missing export for getFunctions in firebase-admin v10.2.0. (Why is not TaskQueue related stuff present in firebase-functions SDK and we have to use two SDK in CF…that’s another question.)

Steps to reproduce:

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

Relevant Code:

import {getFunctions} from 'firebase-admin' - this will never work

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
gijo-varghesecommented, Jun 13, 2022

@dastrouvy upgrading to firebase-admin to latest fixed the issue.

2reactions
lahirumarambacommented, May 16, 2022

Hi @gitdast ,

You are correct, the right way to import functions types is

import { getFunctions, TaskOptions } from 'firebase-admin/functions'

The default region is us-central1, but you can specify a different region in the getFunctions().taskQueue() API by passing it in the function resource name.

getFunctions().taskQueue('locations/{location}/functions/{functionName}')

See the reference docs for more information: https://firebase.google.com/docs/reference/admin/node/firebase-admin.functions.functions#functionstaskqueue

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I export all functions from a file in JS? - Stack Overflow
For example: export default all; The functions are all just in the file, not within an object.
Read more >
export - JavaScript - MDN Web Docs
The export declaration is used to export values from a JavaScript module. Exported values can then be imported into other programs with the ......
Read more >
Node Module Exports Explained - freeCodeCamp
exports being the exported component of any types - object, function, string, and so on. Default exporting in a Node. js module is...
Read more >
PAN is missing EXPORT function - LIVEcommunity - 364963
Solved: I was trying to export the config for the first time and found that in Device/Setup/Operations I see no option for Export....
Read more >
Export data function Missing - Microsoft Power BI Community
I found that when you're sharing the report, you need to have the "Allow users to build new content using the underlying datasets"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found