Ошибка Meteor Babel ES6: «Этот API был удален…» - PullRequest
0 голосов
/ 26 декабря 2018

У меня есть вызов метеорного метода, который имеет код ниже ES6, который не может быть передан из-за ошибки, указанной ниже.

  theOthers.forEach(member => {
    if (member.notifications) {
      const contextIdIndex = member.notifications.findIndex(
        notification => notification.contextId === contextId
      );
      if (contextIdIndex !== -1) {
        const notifications = [...member.notifications];
        notifications[contextIdIndex].count += 1;
        Meteor.users.updateOne(member.memberId, {
          $set: {
            notifications: notifications
          }
        });
      }
    }
  });

Ошибка переноса ошибки:

This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed  from that module, such as 'addNamed' or 'addDefault'.

Есть предложения?Обратите внимание, что у меня есть несколько похожих кодов ES6, которые прекрасно работают.

...