Mongo shell doesnt work properly

Hi, beginner with Mongodb on windows10 here, not sure whether it’s the problem of GitBash or mongo shell. There are several apparent problems.

  1. When I type between texts, the texts on the right side got taken place by the new content, instead of moving right. eg. If I try to add the “l” into “Wecome”, I get “Welome” instead of “Welcome”.
  2. There is no mark at the start of a line, like the gitbash default $ ($ cd … ) to suggest all the commands.
  3. After a few commands,(especially after copy and paste) mongo shell just stops responding
  4. all the shortcuts don’t seem to work except ctrl+c
    What might be the issue here?

Hi @Luke_He ,

Could be the way Git Bash is rendering your Mongo Shell. Could you provide a Screenshot of your Console?

I would recommend using powershell or a cmd emulator like cmder (https://cmder.net/) . Worked for me and I havent dealt with any “Formatting” Errors so far. Hope this helps :smiling_face:

Greetings,
Niklas

2 Likes

Hi Niklas Bleicher,

Yes, the issues don’t happen on powershell. However, would you recommend running mongoose commands on bash while running MongoDB on powershell? Since I am more familiar with bash as a beginner dev. Might I run into some obvious errors working this way?

Kind regards,
Luke


Here is a screenshot

If you look at the Message given in your Screenshot it seems like you are connection to your Mongo Instance with “mongo <your_instance>”. Try using “mongosh <your_instance>” instead, from your bash console.

P.S: If you are running your Mongo locally you can just use the “mongosh” Command without giving an Instance. It will automatically connect to your local Instance

See here for more Information: https://www.mongodb.com/docs/mongodb-shell/
Hope this helps! :wink:

Greetings,
Niklas

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.