You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The newest release of MongoDB does not support the queries made by the version of the Mongoose library in the results_server and survey_server in modules 5 and 6.
The containers start ok, but whenever attempting to submit a new entry from the form at localhost:8080, the survey_server crashes with the following error message:
MongoError: Unsupported OP_QUERY command: insert. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal
Attempting to visit localhost:3000 yields the error Cannot read property 'length' of undefined.
After some digging, it appears that these legacy opcodes were deprecated in MongoDB 5.0 and removed in MongoDB 6.0. While I can't find them mentioned in the index.js files, the database queries must be using these opcodes.
Rewrite the code using the Mongoose library code with their newer methods. According to the warnings from the console, several methods from Mongoose are deprecated and should no longer be used.
The text was updated successfully, but these errors were encountered:
The newest release of MongoDB does not support the queries made by the version of the Mongoose library in the results_server and survey_server in modules 5 and 6.
The containers start ok, but whenever attempting to submit a new entry from the form at localhost:8080, the survey_server crashes with the following error message:
Attempting to visit localhost:3000 yields the error
Cannot read property 'length' of undefined
.After some digging, it appears that these legacy opcodes were deprecated in MongoDB 5.0 and removed in MongoDB 6.0. While I can't find them mentioned in the index.js files, the database queries must be using these opcodes.
Possible Solutions:
mongo:latest
to pull it. Pull request Adjusted some types and avoided some mongo promise errors by choosing a docker mongo version instead of always picking the latest version #56 addresses this issue, though at time of writing it only modifies the README in module 5 and doesn't fix the docker_compose.yml file in module 6.The text was updated successfully, but these errors were encountered: