DEV Community

Sanket N Jain
Sanket N Jain

Posted on

1 1

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.

πŸ‘‹ Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay