Reputation: 439
I'm getting the "Meteor code must always run within a Fiber" with some very simple code.
const notif = async (userId, notifs) => {
try {
console.log('Notif Function Start');
const template = await Assets.getText('email-new-appointment-client.html');
return 'sent';
} catch (error) {
throw new Meteor.Error(500, 'notif functions', error);
}
};
notif is a function called from within a Meteor method. No callbacks involved, no 3rd party promise libraries.
Even running the following in the same function is causing fiber errors:
Email.send({
to: uEmail,
from: '[email protected]',
subject: notifs.title,
html: notifs.body,
});
Upvotes: 0
Views: 184
Reputation: 439
I removed "presets": ["es2015", "es2016", "stage-0", "react"], from my .bablerc file and the errors here went away.
Upvotes: 2