Default Port is not applied

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 3.4.0
    • Affects Version/s: 3.1.0
    • Component/s: Core, Native
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Connecting to the DB using the new url parser, like

       

          MongoClient.connect('mongodb://localhost', {useNewUrlParser: true}, 
      function(err, client) {
      

       

      Throws an assertion error

      AssertionError [ERR_ASSERTION]: null == { MongoError: port must be specified
      

      Even if the official documentation states that port is optional and defaults to 27017

      https://docs.mongodb.com/manual/reference/connection-string/

       
       
       

              Assignee:
              Unassigned
              Reporter:
              Daniele Bellavista
              None
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: