Custom Database Mongo Error "Unsupported OP_QUERY command"
Last Updated:
Overview
Custom database with Mongo template returns the following error:
Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal
Applies To
- Custom Database
- Mongo templates
Cause
Solution
- Find the latest mongodb package version available here.
- Navigate to the custom database and go to the tab called "Custom Database". There should be the database scripts.
- Set the MongoDB package version to the version we found above. Example:
const MongoClient = require('mongodb@5.1.0').MongoClient;