title: UnhandledPromiseRejectionWarning: MongoError: w has to be a number or a string at Connection
body: <p>Anyone has an idea why I am getting this error : " UnhandledPromiseRejectionWarning: MongoError: w has to be a number or a string at Connection." ? I got this error while I was running the code below. It's purpose is to check if a user is in a mongodb database if not it creates a new user by the user email and the hash password. </p>
  
  <p>I don't know if there is any relation, the code seem to work well, but when I updated my mac to catalina OS yesterday I started having this issue.</p>
  
  <pre class="lang-js prettyprint-override"><code>routerAuth.post('/signup', (req, res, next) =&gt; {
      const result = Joi.validate(req.body, schema)
      if (result.error === null) {
          Profile.findOne({
              email: req.body.email
          }).then(profile =&gt; {
              if (profile) {
                  const error = new Error(
                      'The email is already in use. Please choose another one'
                  )
                  res.status(409)
                  next(error)
              } else {
                  bcrypt.hash(req.body.password.trim(), 12).then(hashedpassword =&gt; {
                      let newProfile = new Profile({
                          first: req.body.first,
                          last: req.body.last,
                          password: hashedpassword,
                          email: req.body.email
                      })
  
                      Profile.insertMany(newProfile).then(profile =&gt; {
                          res.json(profile)
                      })
                  })
              }
          })
      }
  })
  </code></pre>