MongoParseError: option usenewurlparser is not supported
Old connection options removed in Mongoose 6 / driver 4 are still passed to mongoose.connect.
MongoParseError: option usenewurlparser is not supportedMongoParseError: option useunifiedtopology is not supportedoption usecreateindex is not supportedMongoParseError: options usecreateindex, usefindandmodify are not supportedMongoParseError: option X is not supported Meaning
useNewUrlParser, useUnifiedTopology, useCreateIndex, useFindAndModify no longer exist. Remove them from connect(uri, options); they're default behaviour. The same error appears with other unknown options after upgrading drivers.
Common causes
- Code copied from old tutorials
- Upgrade to Mongoose 6+/driver 4+
- Unsupported options (useCreateIndex, useFindAndModify)
- Options passed in the URI
- Typos in option names
⚡ Quick fix
- Remove
useNewUrlParser/useUnifiedTopology/useCreateIndex/useFindAndModify - Pass only supported options (see driver docs)
- Check
npm ls mongoose mongodb
Detailed fix by platform
Node.js
await mongoose.connect(process.env.MONGODB_URI);with no deprecated options
How to diagnose
- Options — Deprecated ones?
- Version — Mongoose 6+?
- URI — Unknown parameters?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- buffering timed out MongooseError: Operation `users.find()` buffering timed out after 10000ms
- CastError: Cast to Date/Number/Boolean failed Mongoose: CastError: Cast to date failed for value "abc" (type string) at path "createdAt"
- MissingSchemaError: Schema hasn't been registered for model Mongoose: MissingSchemaError: Schema hasn't been registered for model "User". Use mongoose.model(name, schema)
Most viewed in MongoDB
- Document failed validation MongoDB: MongoServerError: Document failed validation (code 121)
- bad auth : Authentication failed MongoDB: MongoServerError: bad auth : Authentication failed (code 8000 / 18)
- AlreadyInitialized: already initialized MongoServerError: already initialized (rs.initiate on a configured replica set)
Other ways to find it
Where this error sits
Origin: Data. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026