We are getting this error:
MongoError: Unrecognized pipeline stage name: '$changeStream' at queryCallback (/Users/alexamil/WebstormProjects/nabisco/cdt-now/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:244:25) at /Users/alexamil/WebstormProjects/nabisco/cdt-now/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:544:18 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickDomainCallback (internal/process/next_tick.js:218:9)
We have this file, which will update some caches on our server:
'use strict'; import caches = require('../../models/caches'); import {Phase, Acquisition, Category, FunctionalGroup, Role, User, Workstream} from "../../models"; Acquisition.watch().on('change', function (c) { console.log('acq change:', c); }); Category.watch().on('change', function (c) { console.log('category change:', c); }); FunctionalGroup.watch().on('change', function (c) { console.log('functional team change:', c); }); Role.watch().on('change', function (c) { console.log('role change:', c); }); User.watch().on('change', function (c) { console.log('user change:', c); }); Workstream.watch().on('change', function (c) { console.log('workstream change:', c); });
we are migrating from Mongo 2.6 to Mongo 3.4, so some of our data might be missing fields.
Does anyone know how to mitigate this error?
We are now using mongoose version 5.0.16
.