DEV Community

Catur Hidayat
Catur Hidayat

Posted on • Edited on

5 2

[SOLVE] "MongoDB - command not found: mongo"

Hi Everyone

i am new in JS & mongodb.
i tried to install mongodb for global on my mac. but I have a problem.
"mongod" command is works

but when I try "mongo" command, it can not work.

Please help

mongodb #javascript #nodejs

Top comments (4)

Collapse
 
andy profile image
Andy Zhao (he/him) • Edited

Pretty hard to debug this without seeing your full history of installation, but you might need to restart your terminal.

Were you following their tutorial?
docs.mongodb.com/manual/tutorial/i...

Also maybe try a new tab instead of a new window?

Collapse
 
brokylabs profile image
Catur Hidayat

Hai @andy Zhao, I follow the instructions from the link below.
medium.com/@peaonunes/how-to-insta...

After I restart the terminal, the command "mongod" or "mongo" becomes not working at all.

Collapse
 
clemspring profile image
Clemspring

Replace :
mongod --> ./mongod
mongo -->./mongo

Please tell me if it was helpful to you.

Collapse
 
brokylabs profile image
Catur Hidayat • Edited

thanks for the advice, I've tried to re-install,
and now it's ok. .. [SOLVE]

nextjs tutorial video

Youtube Tutorial Series

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay