Closed jimaldon closed 2 years ago
Hi, This issue is caused by the server container being unable to connect to the MongoDB container.
Can you attach your .env file here so I can check?
server/.env
MONGO_URL="mongodb://sorasvl-mongo:27017"
MONGO_DB_NAME="WISE"
This looks correct. I am not sure where the problem can happen. Still looks like a connection issue.
Can you take a look if you can access the mongodb url using Mongo Compass (desktop application), mongo url "mongodb://localhost:27017"
I just did some searching it is also possible that you put the ".env" file at the wrong location. https://www.mongodb.com/community/forums/t/typeerror-cannot-read-property-startswith-of-undefined/146999/4
Can you confirm your file structure looks like the following? server/ ├── src/ (… ,db.js , index.js) ├── .env └── package.json
Hi @YuqiHuai Yuqi, I encouter the same problem. Do you know how to fix it? My .env is:
MONGO_URL="mongodb://sorasvl-mongo:27017"
MONGO_DB_NAME="WISE"
Which is not the "mongodb://localhost:27017"
in your replay. Which is correct?
I finally worked out the problem. Should use the "mongodb://sorasvl-mongo:27017"
, this works.
Hi @umdreamer I apologize for the late reply!
where does it say mongodb://localhost:27017? I need to remove this
I am going to close this issue due to inactivity. Please reopen the issue if the problem isn't solved or open a new one for other issues.
Again, thank you so much for posting issues here!
docker logs
sorasvl-server
gives me the following error when trying to debug why every container butsorasvl-server
is up and running. I'm using the standard.env
file like in the template