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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.13.2
    • Fix Version/s: 0.14.0
    • Component/s: Shell API
    • Labels:
      None
    • Documentation Changes:
      Not Needed
    • Sprint:
      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

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

              Dates

              Created:
              Updated:
              Resolved: