Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Build a REST API With Express Modeling Data for the API Connecting Mongoose to MongoDB

Michael Pashkov
Michael Pashkov
22,024 Points

bash: mongo: command not found any help?

Hi, Run - mongo bash: mongo: command not found any help?

2 Answers

Rich Donnellan
MOD
Rich Donnellan
Treehouse Moderator 27,671 Points

Did you take the recommended prerequisite course and/or install mongo? All signs point to a missing installation.

I suggest checking out this video from the Mongo Basics course: https://teamtreehouse.com/library/setting-up-mongodb

Michael Pashkov
Michael Pashkov
22,024 Points

Rich, Thank you. I did take the prerequisite course. And I followed Andrew. I managed all stuff in the end. But I installed newer version of programs. And I had to change a bit flow / code.

mongoose.connect("mongodb://localhost:27017/sandbox", { useNewUrlParser: true });

And I read mongoDB by command:

1 "C:\Program Files\MongoDB\Server\4.0\bin\mongod.exe" --dbpath="c:/Users/name/data/db/"

2 "C:\Program Files\MongoDB\Server\4.0\bin\mongo.exe"

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/#start-mdb-edition-as-a-windows-service

use sandbox