JKHeadley / rest-hapi

🚀 A RESTful API generator for Node.js
https://resthapi.com
MIT License
1.19k stars 153 forks source link

MongoError: password cannot be empty #144

Open genaro-picazo opened 6 years ago

genaro-picazo commented 6 years ago

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):

JKHeadley commented 6 years ago

@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.

TLMcNulty commented 5 years ago

@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.