Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1547

Default Port is not applied

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

      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 Unassigned
            Reporter:
            l0th1 Daniele Bellavista
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: