mongoose-seed
mongoose-seed copied to clipboard
Error: 'useCreateIndex' is an invalid option
When I try to execute the seeder it shows the error message:
if (VALID_OPTIONS.indexOf(key) === -1) throw new Error(`\`${key}\` is an invalid option.`);
^
Error: `useCreateIndex` is an invalid option.
The option UseCreateIndex is deprecated in Mongodb. Is there any way to connect to database with an options object instead of just a ConnectionString?
I'm trying to execute:
seeder.connect(process.env.DB_CONNECTION, function () {
...
}
Deleting following lines from index.js is enough. These options are deprecated and now are true by default.
mongoose.set("useCreateIndex", true); mongoose.set("useNewUrlParser", true);
When will the package be updated? so we won't have manually delete the 2 lines every installation?
+1 When will the package be updated?
+1 When will the package be updated?
+1
+1
@seanemmer
+1