1

Error: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/firestore' is not defined by "exports" in /Users/macbook/Desktop/ein-itin-firebase-functions/functions/node_modules/firebase-admin/package.json

3 Answers 3

8

My Solution is change the

import { getFirestore } from "firebase-admin/lib/firestore";

to

import { getFirestore } from "firebase-admin/firestore";
Sign up to request clarification or add additional context in comments.

Comments

1

Check your log

Open the following file and you can see the specific error that caused this

firebase-debug.log

Comments

0

Wherever you're using the functions key word, you must also import the proper library:

Example:

exports.helloWorld = functions.https.onRequest((request, response) => {
  functions.logger.info("Hello logs!", {structuredData: true});
  response.send("Hello from Firebase!");
});

then import const functions = require("firebase-functions");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.