mongodb-js / mongodb-prebuilt

Install MongoDB prebuilt package using npm https://npmjs.org/package/mongodb-prebuilt
ISC License
56 stars 50 forks source link

"Data directory not found" #54

Open hems opened 5 years ago

hems commented 5 years ago

I'm running the example code but i'm getting:

  const mongodHelper = new MongodHelper(['--port', "27018"]);

  return mongodHelper.run()

"(node:24166) UnhandledPromiseRejectionWarning: Data directory not found".

sauraku commented 4 years ago

Having the same issue, Did you find any solution?

hems commented 4 years ago

Having the same issue, Did you find any solution?

I'm actually using this instead: https://github.com/nodkz/mongodb-memory-server

it runs on memory instead of actually opening a MongoDB server.

I believe there are a few small limitations, i believe regarding replica sets, but most projects don't need that during tests.

sauraku commented 4 years ago

Thanks for replying... But happy to report that after a couple of hours of tinkering and experimenting, i was able to write the required code from scratch. No shortcut npm module used. 😊