Help me with this error "internal/modules/cjs/loader.js:638"

sanketnjain5 profile image Sanket N Jain ・1 min read

I'm tired of searching a solution for this error but it seems that no one has a proper solution. It is unable to find campground.js file in the models directory. I even tried reinstalling npm, but no luck.

Alt Text

I have my campground.js file in the models directory and I'm not able to run my app.js file.

Alt Text

Alt Text

Alt Text


markdown guide

I think you misspelled your file. πŸ˜‚

Simply rename capmground.js to campground.js.


Ah, that has something to do with your MongoDB installation. You probably forgot to start up the database service. A quick Google search should do the trick. Otherwise, a re-installation may be due.

I think something's wrong with me today. I didn't start the database. I should probably get some sleep!!


Ohh shitπŸ˜‚πŸ˜‚


It all happens to the best of us, my friend. Welcoming to programming. πŸ˜‚

I'll be deleting this question or else people will think I'm stupid πŸ˜‚πŸ˜‚

Nah, you're not. It was just a simple mistake. We've all been there. Trust me.