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

539
Views
Firebase Deploy - No 'exports' main defined in firebase/package.json

Every time I run 'firebase deploy' I get this error message:

Error: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/ghaith/Desktop/FacilityManagement/fm_back/functions/node_modules/firebase/package.json

I've tried reinstalling npm modules, I updated everything as well!

const functions = require("firebase-functions");
const admin = require("firebase-admin");
const app = require("express")();
admin.initializeApp();

const config = {...};

const firebase = require("firebase");
firebase.initializeApp(config);

app.get("/requests", (req, res) => {
    admin
        .firestore()
        .collection("requests")
        .orderBy("createdAt", "desc")
        .get()
        .then((data) => {
            let requests = [];
            data.forEach((doc) => {
                requests.push({
                    requestID: doc.id,
                    fname: doc.data().fname,
                    email: doc.data().email,
                    desc: doc.data().desc,
                    issue: doc.data().issue,
                    address: doc.data().address,
                });
            });
            return res.json(requests);
        })
        .catch((err) => console.error(err));
});
exports.api = functions.https.onRequest(app);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think the problem with Firebase Cli v11.0!

Can you check the version and try to use Firebase Cli v10.8 for now.

It has some breaking changes with ext:dev:emulators:start and ext:dev:emulators:exec preview commands. Hence creating that problem.

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!