Search code examples
mongodbmongoosenode-mongodb-native

Array filter work on older version of mongoose and mongodb


This error gives when you have mongoose and mongo db version is out of updated

{
message: No array filter found for identifier ele in path 
membersArray.$[].challenge_video.$[ele].status,
driver: true, index: 0, code: 2, 
errmsg: No array filter found for identifier ele in path membersArray.$[].challenge_video.$[ele].status
 }

Solution

  • after two days of finding solution i got it simply uninstall older version of mongo and install mongodb LTS then update mongoose also In my package.json it written "mongoose": "*",

    after install mongoose update version it change's to "mongoose": "^5.10.9"

    Now working awesome! Yes got the solution.