mongodb-memory-server doesn't work with mongodb v4 on Ubuntu 18.04
sudo apt-get install libcurl3
may help
mongodb-memory-server doesn't work with mongodb v4 on Ubuntu 18.04
sudo apt-get install libcurl3
may help
$ node ./mongodb-memory-server-no4.js | |
3.6.3 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.3 | |
stop 3.6.3 | |
3.6.4 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.4 | |
stop 3.6.4 | |
3.6.5 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.5 | |
stop 3.6.5 | |
3.6.6 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.6 | |
stop 3.6.6 | |
3.6.7 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.7 | |
stop 3.6.7 | |
3.6.8 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. | |
[!] If you see this, then mongodb-memory-server works with mongo 3.6.8 | |
stop 3.6.8 | |
4.0.0 | |
--> b4 new MongodbMemoryServer.default.. | |
--> b4 mongod.getConnectionString().. |
const MongodbMemoryServer = require('mongodb-memory-server'); | |
async function main(v) { | |
try{ | |
console.log(v); | |
console.log("--> b4 new MongodbMemoryServer.default.."); | |
var config = { | |
instance: { | |
dbName: 'run', | |
}, | |
binary: { | |
version: v, | |
}, | |
//debug: true,// add this to see errors | |
}; | |
const mongod = new MongodbMemoryServer.default(config); | |
console.log("--> b4 mongod.getConnectionString().."); | |
const mongoUri = await mongod.getConnectionString(); | |
console.log("[!] If you see this, then mongodb-memory-server works with mongo "+config.binary.version); | |
await mongod.stop(); | |
console.log("stop "+config.binary.version); | |
}catch(err){ | |
console.error("Something wrong with "+config.binary.version,err); | |
} | |
} | |
main('3.6.3') | |
.then(()=>{ | |
return main('3.6.4'); | |
}) | |
.then(()=>{ | |
return main('3.6.5'); | |
}) | |
.then(()=>{ | |
return main('3.6.6'); | |
}) | |
.then(()=>{ | |
return main('3.6.7'); | |
}) | |
.then(()=>{ | |
return main('3.6.8'); | |
}) | |
.then(()=>{ | |
return main('4.0.0'); | |
}) | |
.then(()=>{ | |
return main('4.0.1'); | |
}) | |
.then(()=>{ | |
return main('4.0.2'); | |
}) | |
.then(()=>{ | |
return main('4.0.3'); | |
}) | |
.catch((err)=>{ | |
console.log('oh noes'); | |
}) | |
; |