lets-chat icon indicating copy to clipboard operation
lets-chat copied to clipboard

MongoDB version 3.6.3 $pushAll Error

Open john-trieu-nguyen opened this issue 7 years ago • 1 comments

When joining a password protected private room with MongoDB version 3.6.3, error is thrown: MongoError: Unknown modifier: $pushAll

$pushAll has been deprecated since 2.4 and it is no longer in MongoDB 3.6.3.

To fix, add { usePushEach: true } to the var RoomSchema in app/models/room.js

Previously: var RoomSchema = new mongoose.Schema({ ... });

New: var RoomSchema = new mongoose.Schema({ ... }, { usePushEach: true });

john-trieu-nguyen avatar Mar 13 '18 14:03 john-trieu-nguyen

I had the same problem, and that was the solution.

https://github.com/Automattic/mongoose/issues/5574#issuecomment-332290518

losingle avatar Apr 29 '18 18:04 losingle