'why am I getting this "Cannot find module server.js"?
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
Solution 1:[1]
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
Solution 2:[2]
Your code is currently nodemon backend/server.js, but it should be nodemon backend/backside/server.js.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | clokam13 |
| Solution 2 | moonwave99 |
