throw new MongoParseError('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');
MongoParseError: Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"
Out of the question, If you are using mongoose latest version then don’t need to pass useUnifiedTopology: true, and useNewUrlParser: true in connection because by default it set true
[MONGOOSE] DeprecationWarning: Mongoose: the strictQuery option will be switched
back to false by default in Mongoose 7. Use mongoose.set('strictQuery', false); if you want to prepare for this change. Or use mongoose.set('strictQuery', true); to suppress this warning.
Invalid scheme, expected connection string to start with “mongodb://” or “mongodb+srv://”
both the error will be gone
first use the
// mongoose.set(‘strictQuery’, true) in top
and remove the extra space in the link of mondodb
The line which is having your connect string.Remove semicolon at the end of connect string
Please scroll to top of this thread where you see DB_CONNECT = ‘your_connect_string’; <------------ remove this semicolon