Home > database >  why am I getting this "Cannot find module server.js"?
why am I getting this "Cannot find module server.js"?

Time:04-19

I had a Traversy Media tutorial on how to learn the MERN stack that I was following. I had the first part installed on my desktop and it was working properly. opened it back after two weeks and I am getting '/Users/mohamedsoliman/Desktop/Traversy Media/backend/server.js' the problem here is that the folder structure should have a "backside folder" so server.js should be at "'/Users/mohamedsoliman/Desktop/Traversy Media/backend/backside/server.js'"

Not sure how can I fix this or if that's the only problem I have here ?

This image shows the directory structure I have for the project

This image shows the error I am getting

CodePudding user response:

It looks like your server.js is your entry point for the app.

In that case, run the app as follows,

node backend/backside/server.js 

CodePudding user response:

You're code is currently nodemon backend/server.js, but it should be nodemon backend/backside/server.js.

  • Related