Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda