Open MuhaAllAmeen opened 2 years ago
Hi, thank you for let me know your issue. The issue you meet because you missing define your .env
file in your working repo. Because security issue so i dont upload .env file to public repo. However, i can give you sample for that
ADMIN_PASSWORD=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_NAME=
JWT_SECRET=
MONGO_URI=
NODE_ENV=
PAYPAL_CLIENT_ID=
PORT=
In this project, i am using Mongo Atlas for database management, so all you need to fix this error is replace your MONGO_URI
Example format: mongodb+srv://<YourAccount>:<YourPassword>@<YourCluster>.xqtd0.mongodb.net/<YourCollection>?retryWrites=true&w=majority
Hi, I have given the appropriate uri, port and the node_env but I just can't seem to run the program. I move to the main directory and type in npm start and still get the same error. Am I missing something? Your help would be greatly appreciated.
Can u give me screenshot of error, error message description, your .env
file or something related about that?
I have found your problem. Please move your .env file to one outer folder, same level with backend folder, not inner backend folder
Thank you so much for your help. The server now seems to be working in development mode but the webpage does not seem to open on npm start. Am I missing something?
This is what I get on opening local host 5000. How do I get to the web page itself?
You are welcome, to run webpage, all steps u need is:
npm run dev
(for start both BE and FE) or run npm run client
for only FE, u can see more scripts in my package.json in root folder.
Hi I get the error "Error: The
uri
parameter toopenUri()
must be a string, got "undefined". Make sure the first parameter tomongoose.connect()
ormongoose.createConnection()
is a string." while trying to npm start the fashion shop 2.0 folder.