I wrote following code to connect mongodb through native driver which has been install with npm install mongodb --save
I want to add to this thread that it may also have to do with other dependencies.
For instance, nothing I updated or set for NodeJS, MongoDB or Mongoose were the issue - however - connect-mongodb-session
had been updated and starting slinging the same error. The solution, in this case, was to simply rollback the version of connect-mongodb-session
from version 2.3.0
to 2.2.0
.
UPDATE: The issue is now fixed in connect-mongodb-session@2.3.1
.