qrev icon indicating copy to clipboard operation
qrev copied to clipboard

[BUG] connecting to QRev Analytics db cluster

Open MuratDoganer opened this issue 1 year ago • 3 comments

Describe the bug When running npm start in the /server folder, I get the following error:

2024-11-27T16:06:12.866Z: error: Error connecting to QRev Analytics db cluster:  The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
 Stack: MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.

To Reproduce Steps to reproduce the behavior:

  1. Follow set up steps
  2. Make sure a database is created and the connection string is correct
  3. Enter the connection string in the env file under MONGODB_URL
  4. run npm ci followed by npm start, the error comes up

MuratDoganer avatar Nov 27 '24 16:11 MuratDoganer

FYI, this can be fixed by adding the following to the .env:

QREV_MONGO_DB_2_URL=

I recommend making a new db for this as well

MuratDoganer avatar Nov 27 '24 17:11 MuratDoganer

Its not a bug , Its an error which is caused because , you haven't provided a valid MongDB URL. The first step would include creating an .env file in the root of your project folder that you cloned.

Inside the .env : MONGODB_URI=mongodb+srv://username:[email protected]/database-name

Surya-sourav avatar Jun 30 '25 17:06 Surya-sourav

Its not a bug , Its an error which is caused because , you haven't provided a valid MongDB URL. The first step would include creating an .env file in the root of your project folder that you cloned.

Inside the .env : MONGODB_URI=mongodb+srv://username:[email protected]/database-name

I am not sure if you read the entire report, and the follow up.

MuratDoganer avatar Jun 30 '25 19:06 MuratDoganer