Mohamad Nagi
Mohamad Nagi

Reputation: 43

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

package.jsonI 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

Upvotes: 1

Views: 3551

Answers (2)

Exortions
Exortions

Reputation: 313

Your code is currently nodemon backend/server.js, but it should be nodemon backend/backside/server.js.

Upvotes: 2

clokam13
clokam13

Reputation: 171

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 

Upvotes: 1

Related Questions