feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
221 stars 41 forks source link

getting error collection.find(...).sort(...).limit(...).nextObject is not a function #110

Closed adambezecny closed 4 years ago

adambezecny commented 5 years ago

we are using mongodb package 3.1.0 in order to connect to our mongo instance. When trying to inittialize feathers-sync like this:

feathersjsApp.configure(sync.mongodb({
  db: dbHandle,
  collection: 'feathers_events'
}))

I am getting error:

TypeError: collection.find(...).sort(...).limit(...).nextObject is not a function at Channel.onCollection (...\node_modules\mubsub\lib\channel.js:204:14)

After quick research it seems nextObject method is not supported any more:

https://github.com/mongodb/node-mongodb-native/blob/master/CHANGES_3.0.0.md#api-changes