Sarvesh Kulkarni
Sarvesh Kulkarni

Reputation: 981

Mongodb: Invalid Command error

I'm developing web application using node js and mongo db. Initially I got this error - failed to connect to [localhost:27017]. I followed the steps in this answer [Link: https://stackoverflow.com/a/39276869/7697507]. But, after doing the 3rd step, I am getting this error.

Can anyone please let me know how to solve it?

MongoDb: Error

Upvotes: 0

Views: 1669

Answers (1)

Kyle Becker
Kyle Becker

Reputation: 1440

Windows doesn't allow spaces in paths like this.

Try: mongod --dbpath "C:\Users\dell pc\Desktop\Real Safe\final\data"

With the path in quotes.

Upvotes: 1

Related Questions