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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 0.13.2
    • 0.14.0
    • Shell API
    • None
    • Not Needed
    • Iteration Chicago

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: