[SOLVED] Meteor v2.8 migration to async

Hello, I’m trying to migrate my app to the new v2.8 with all the changes related to the async calls in order to get rid of the Fibers package.
The problem I’m having is that when I try to run the method findOneAsync from my mongoose schema it’s showing me the error that the findOneAsync is not a function, I suppose that the problem is coming from the mongoose schema, what am I missing here? Thank you, I add the code of the backend code.

import groupsMongo, { findOneAndRemove, find, findOneAndUpdate, findOneAsync } from ‘…/schemas/groups.js’;

export const getMyGroups = async () => {

if (!Meteor.userId()) {
throw new Meteor.Error(‘not-authorized’);

let groups = await findOneAsync({ ‘user_id’: Meteor.userId() });

console.log('groups ', groups);

you will need to go to the file where you imported that function. In this case it’s …/schemas/groups.js

Exactly, we need to see “groups.js” content.

Here you have the content of the “groups.js” file.
Thank you for answering guys!

1 Like

You are not using Meteor’s Mongo methods so you have nothing to migrate.

Oh, that’s why it’s not working, thanks!
What do you recommend me to do then in order to get rid of the Future method and the fibers package?

Follow the migration plan on the next versions until Meteor 3.0

Thank you so much for you help @rjdavid!