mongoose(6.0.12) throw error Error: option gssapiservicename is not supported.
Here the code for setting up the mongodb connection :
const connectDB = async () => {
try {
const conn = await mongoose.connect(process.env.MONGO_URI, {
useUnifiedTopology: true,
useNewUrlParser: true,
})
console.log(`MongoDB Connected: ${conn.connection.host}`.cyan.underline)
} catch (error) {
console.error(`Error: ${error.message}`.red.underline.bold)
process.exit(1)
}
}