rest-hapi icon indicating copy to clipboard operation
rest-hapi copied to clipboard

MongoError: password cannot be empty

Open genaro-picazo opened this issue 6 years ago • 2 comments

Describe the bug Since I am am not running mongodb locally, I have created a db on my mlab account and am trying to seed it via the ./node_modules/.bin/rest-hapi-cli seed <my mlab db URI> command. Collections are created successfully, but data is not seeded, as there is an error.

To Reproduce Steps to reproduce the behavior:

  1. Create an mlab account, create a test database and database user. Obtain the URI to access it.
  2. Clone the test repo as per the quickstart
  3. Try seeding the mlab database using the URI obtains in (1)
  4. See error

Expected behavior Mlab database would be created and collections would be seeded

Actual Behavior The follow error occurs: "MongoError: password cannot be empty"

Desktop (please complete the following information):

  • OS: Windows 7 x64
  • terminal

genaro-picazo avatar Sep 13 '18 22:09 genaro-picazo

@gpicazo I tried creating a new mlab db and was unable to replicate your issue. However I'm using macOS instead of windows so that could be the issue.

Have you tried starting your server and testing the endpoints through the swagger UI? If all is working you should be able to create a user manually.

JKHeadley avatar Sep 13 '18 23:09 JKHeadley

@gpicazo did you ever figure this out? I'm having the same issue with an mlab account.

Edit: I'm dumb my URI was actually missing the password.

TLMcNulty avatar Jan 15 '19 22:01 TLMcNulty