Skip to content
loading...

re: Testing Node.js + Mongoose with an in-memory database VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hey, I've been struggling to get mongodb-memory-server to work on Circle Ci, any chance you could share your CircleCi config? I keep getting this e...

🤔 looks like MongoMemoryServer is trying to download a binary for the default MongoDB version that is compatible with the OS running on your CircleCI server/container but can't find it.

I've never worked with CircleCI but I'd recommend you to check if the MongoDB version that MongoMemoryServer is trying to download is available for your OS & architecture.
Here's the code where the download URL for the binaries is generated, in case you want to check that out: MongoBinaryDownloadUrl.

Maybe you can set a specific version of MongoDB that exists for your platform, like this:

    mongod = await MongoMemoryServer.create({ binary: { version: '4.2.6' } });
    const uri = await mongod.getConnectionString();

Another way to go would be to activate debug mode so you can get more info on the error. Just set the debug option to "1" in the package.json config section. More info here

code of conduct - report abuse