I’m trying to host my backend Server folder but I’m getting this error and have no clue where the issue is. I looked on stackoverflow, but it’s no.
uri parameter to
openUri() must be a string, got “undefined”. Make sure the first parameter to
mongoose.createConnection() is a string.
From the error message it seems that the variable you are using doesn’t have any value or does not exist. My first guess is that you’re doing something like
but that env variable is not defined in your render settings. That’s just a guess.
How are you connecting to Mongo? Can you share a code snippet?
My guess is that you’re calling a process.env variable in your code but haven’t added the value as an environment variable in your Render service: https://render.com/docs/configure-environment-variables
Jérémy, Render Support
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.