Reputation: 681
const functions = require("firebase-functions");
functions.logger.log("Hello from info. Here's an object:", someObj);
So when I run functions.logger.log this is the error I get:
TypeError: Cannot read property 'log' of undefined
Why is logger undefined and how do I fix this?
Upvotes: 3
Views: 420
Reputation: 317467
Check your version of the firebase-functions module. The logger requires version 3.7.0 or later. The latest at the time of this writing is 3.13.0.
Upvotes: 3