-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Description
Related issues
[REQUIRED] Version info
upgrade from ^5.1.1 to ^6.0.1
node:
20
firebase-functions:
^6.0.1
firebase-tools:
13.15.2
13.5.2
firebase-admin:
^11.8.0
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
Execute the following command npm install --save firebase-functions@latest
and when I run the code I get the following error
TypeError: functions.runWith is not a function
A sample code is:
const functions = require('firebase-functions');
exports.newAccount = functions
.runWith({
memory: '256MB',
maxInstances: 1,
})
.auth.user().onCreate(async (user) => {
const email = user.email;
const subject = "Welcome"
try {
console.log("A new user account has been created")
await sendWelcome(email,subject);
} catch (error) {
console.error('Error sending email:', error.message);
}
});
[REQUIRED] Expected behavior
[REQUIRED] Actual behavior
TypeError: functions.runWith is not a function