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
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");