mosh-hamedani / vidly-api-node

309 stars 285 forks source link

node seed.js fail #49

Open dextreeamper opened 1 year ago

dextreeamper commented 1 year ago
/Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/pool.js:595
          return handleOperationCallback(self, workItem.cb, new MongoError(message.documents[0]));
                                                            ^
MongoError: Unsupported OP_QUERY command: delete. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal
    at /Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/pool.js:595:61
    at authenticateStragglers (/Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/pool.js:513:16)
    at Connection.messageHandler (/Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/pool.js:549:5)
    at emitMessageHandler (/Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/connection.js:309:10)
    at Socket.<anonymous> (/Users/user/Development/vidly-api-node/node_modules/mongodb-core/lib/connection/connection.js:452:17)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  ok: 0,
  errmsg: 'Unsupported OP_QUERY command: delete. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal',
  code: 352,
  codeName: 'UnsupportedOpQueryCommand'
}
SincerelyBrittany commented 1 year ago

+1 to this issue, I used this one @dextreeamper: https://github.com/amujuruprasad/vidly-api-nodejs

mentalhead commented 1 year ago

Install MongoDB 5.0 instead of the latest version, I just installed it and it works.

Unsupported OP_QUERY command: delete

It seems that OP_DELETE isn't available in MongoDB 6.0, so a workaround is to use version 5.0 instead.