MongoServerSelectionError: connect ECONNREFUSED insdie docker container

Hi again, regarding the OP_QUERY error, I have a resolution on it. I tried nodejs drivers 2.2.x, 3.0.0, 3.1.0 and above. this is related to versions before 3.1.0 and mongodb 5.1 and newer.

I have a bit longer answer about this here:

in case you are sure you tried to update to 4.13 and got this error, then be sure it did not. you need to rebuild the image but first remove its traces from your docker cache. docker records commands as layers, and if a command is not changed, here npm install, it may not be run again, and previous 2.3 driver layer might be in use.