Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

151
Visualizações
Package path ./standalone is not exported from package

I'm trying to use the firebase admin SDK, heres my code:

import * as admin from 'firebase-admin';

var firebaseAdminAccount = require("../serviceAccount.json");

var app : admin.app.App = null;

if(!admin.apps.length)
{
  app = admin.initializeApp({
    credential: admin.credential.cert(firebaseAdminAccount)
  })
}

if(app === null)
{
  app = admin.apps[0];
}

export default app;

the idea behind this is that whenever used, it will check if the firebase admin SDK is initialized or not, if it's not, then it will initialize it, then export it.

My problem however is when I try to run this, it gives me the following error:

error - ./node_modules/firebase-admin/lib/app/firebase-namespace.js:106:0 Module not found: Package path ./standalone is not exported from package D:\NewRepos\1d3a\node_modules@firebase\database-compat (see exports field in D:\NewRepos\1d3a\node_modules@firebase\database-compat\package.json)

Import trace for requested module: ./node_modules/firebase-admin/lib/default-namespace.js ./node_modules/firebase-admin/lib/index.js ./lib/firebaseAdminSdk.ts ./middleware.ts

https://nextjs.org/docs/messages/module-not-found\

I just installed everything so it should be on the latest version, anyone have an idea why this is happening?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Seems like I didn't realize that Next.js middleware runs on V8, and therefor, firebase-admin cannot run on it. Back to the drawing board.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda