DEV Community

Sanket N Jain
Sanket N Jain

Posted on

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

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

Top comments (8)

Collapse
 
somedood profile image
Basti Ortiz • Edited

I think you misspelled your file. πŸ˜‚

Simply rename capmground.js to campground.js.

Collapse
 
sanketnjain5 profile image
Sanket N Jain

now i'm getting another error
dev-to-uploads.s3.amazonaws.com/i/...

Collapse
 
somedood profile image
Basti Ortiz

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.

Thread Thread
 
sanketnjain5 profile image
Sanket N Jain

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

Collapse
 
sanketnjain5 profile image
Sanket N Jain

Ohh shitπŸ˜‚πŸ˜‚

Collapse
 
somedood profile image
Basti Ortiz

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

Thread Thread
 
sanketnjain5 profile image
Sanket N Jain

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

Thread Thread
 
somedood profile image
Basti Ortiz

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

Some comments may only be visible to logged-in visitors. Sign in to view all comments.