Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-786

"new Mongo()" gives error "TypeError: Mongo is not a constructor"

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.14.0
    • Affects Version/s: 0.13.2
    • Component/s: Shell API
    • None
    • Not Needed
    • Iteration Chicago

      Problem Description

      "new Mongo()" doesn't work

      Steps to Reproduce

      run mongosh 0.13.2, doesn't matter if connected or not
      run "new Mongo()"

      Expected Results

      creates a mongo connection

      Actual Results

      gives error "TypeError: Mongo is not a constructor"

      Additional Notes

      • plain "Mongo()" seems to work OK
      • this will break compatibility with existing mongo shell scripts
      • not sure if related to MONGOSH-661

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            spencer.brown@mongodb.com Spencer Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: