saslprep warning when using MongoClient.connect()

Please use this command in your app. It worked for me. Hope it help you.

npm install saslprep --save

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');
}