relay-workshop
relay-workshop copied to clipboard
MongoError: Mongodb does not provide binaries for versions before 4.2.1
Open this issue, in case, you had this error when to run testing in this project.
Requested Version "4.0.5" is not available for "Debian 11"! Available Versions: ">=4.2.1"
Mongodb does not provide binaries for versions before 4.2.1 for Debian 10+ and also cannot be mapped to a previous Debian release
In my case, I'm using debian 11 version. Sure, error tell me what to do...
<rootDir>/apps/server/test/environment/mongodb.js.
Check this in mondodb.js
const dbName = config.MONGO_URI_TEST.split('/')[3];
// TODO - enable replset if needed
// this.mongod = new MongoMemoryReplSet({
this.mongod = new MongoMemoryServer({
instance: {
// settings here
// dbName is null, so it's random
dbName,
},
binary: {
--------------> version: '4.0.5',
},
// debug: true,
autoStart: false,
});
}
Change the version the error is inducing to which will work on your OS. In my case, using 4.2.1 running as well...
make this a .env ?
it is not necessary. this is a common compatibility error in mongo memory server, it only reports that it must change the binary version, where I put the arrow in the mongodb.js file. When you do that, you will see that the error will change and it will start to download the instance on your machine.