[nodemon] app crashed - waiting for file changes before starting...

Did you search for the error?

I assume you have to remove the useCreateIndex option or downgrade.

1 Like

did you mean in server.js file

just following the video on Youtube but got the error : Learn the MERN Stack - Full Tutorial (MongoDB, Express, React, Node.js) - YouTube

after 20 minutes

Why my post request not working ???

Can you please post a link to your project code?

1 Like

bhusalsamir907/mern-exercise-tracker: Tutorial FreeCodeCamp 2019 (github.com)

I cloned your repo locally and when I put in my own MONGO uri, the server starts right up with no errors. My guess is your credentials are not valid or the username was not given read/write privileges which are needed.

Also, make sure not to put any space between the environment variable and the = and the value assigned to it in your .env file.

Lastly, you should always make sure you add .env to your .gitignore file to keep it out of the repo (and its history). Here is a good article on removing .env from git history.


FYI - I hope you understand you can not use this code shown in the video for your submitted project to the Exercise Tracker certification project. The code for the project must be your own original work. Maybe that is not what you were planning, but wanted to let you know in case that was your goal.

1 Like

Remember to gitignore the node_modules folder as well.

Unless the env file you are using has the port number (which it doesn’t on GitHub) you will use port 5000 and not 3000 for the backend and if you are running the React app it runs on port 3000 so it might look like you are connecting to the backend (in Insomnia) when it is just the frontend server you are hitting. This means you won’t see connection errors but routing errors.

1 Like

Thank you so much, it worked!

Thank you so much, it worked! and I was not aware of the port.