我正在使用一些非常简单的代码获得“Meteor代码必须始终在光纤内运行” .
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是一个在Meteor方法中调用的函数 . 不涉及回调,没有第三方承诺库 .
即使在同一功能中运行以下操作也会导致光纤错误:
Email.send({
to: uEmail,
from: 'fake@email.com',
subject: notifs.title,
html: notifs.body,
});
1 回答
我从.bablerc文件中删除了“预设”:[“es2015”,“es2016”,“stage-0”,“react”],这里的错误消失了 .