As of MongoDB 6.0, legacy opcodes were removed, which means if you’re using a version of the driver that predates MongoDB 3.6 support (where the OP_MSG opcode was introduced), the application will not work.
The Node driver added OP_MSG support with the 3.2.0 release, so if you’re using 3.1.13 this error should be expected.