Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

162
Views
How to use `firebase-admin` inside firebase functions using ES2015

Nothing I do here seems to work, I can't find an example anywhere that actually seems correct

This:

import { initializeApp } from 'firebase-admin/app';

Throws:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '\path\to\my-proj\functions\node_modules\firebase-admin\app' imported from \path\to\my-proj\functions\index.js

This:

import * as admin from "firebase-admin";
admin.initializeApp();

Throws:

TypeError: admin.initializeApp is not a function

my functions' package.json looks like:

  "dependencies": {
    "firebase-admin": "^9.12.0",
    "firebase-functions": "^3.20.1"
  },

What's going on, what's the correct syntax?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You're using code samples meant for version 10 of firebase-admin, whereas you have version 9 installed. Read this for more information and run npm install firebase-admin@latest to get the latest version 10.1.0.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!