After updating my Firebase dependencies (need new features) i’ve been trying to deploy them without success.
firebase deploy --only functions
Before the update everything worked fine. Here is the Firebase documentation page for logging.
https://firebase.google.com/docs/functions/writing-and-viewing-logs#custom-logs
require("firebase-functions/lib/logger/compat");
Now the logging fails and i cant understand why.
Error: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/logger/compat' is not defined by "exports" in /Users/admin/Desktop/Xxxxxxx Xcode/functions/node_modules/firebase-functions/package.json
I’ve tried to delete and reinstall. Current versions are now.
Node = v16.18.0
firebase tools = 11.15.0
What could i be missing?
2
Answers
I got it.
maybe you use
[email protected](latest)
now.from version 4, we can use
Edit like this, it worked.
Had the same issue.
I imported the logger like this before:
switching it to the following solved the issue for me: