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

150
Views
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 answers
Answer question

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 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!