saslprep warning when using MongoClient.connect()

Just install the saslprep package and the warning will go away.

The mongodb package looks for the saslprep package, but works without it; it’s an optional dependency.

If you look in the mongodb source:

let saslprep;
try {
  saslprep = require('saslprep');
} catch (e) {

And, later:

if (!saslprep) {
    console.warn('Warning: no saslprep library specified. Passwords will not be sanitized');
}

Leave a Comment

tech