Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"err":{"message":"option usefindandmodify is not supported" #93

Open
Shancella opened this issue Aug 20, 2023 · 0 comments
Open

"err":{"message":"option usefindandmodify is not supported" #93

Shancella opened this issue Aug 20, 2023 · 0 comments

Comments

@Shancella
Copy link

Hi, first of all thanks for the app, great product. I want to join the community and let everyone use my server.

My:
node: v18.17.1
npm: 9.8.1
mongodb: 4.4.4 (in docker)

Error: "err":{"message":"option usefindandmodify is not supported"

I found out that it has something to do with the db.js: useFindAndModify: false setting
I disabled it, the API started, but I don't know what might not work without it

Full err: root@nodejs:/app/api# node dist/api.js
{"name":"xBrowserSync_api","hostname":"nodejs","pid":7182,"level":50,"req":null,"err":{"message":"option usefindandmodify is not supported","name":"MongoParseError","stack":"MongoParseError: option usefindandmodify is not supported\n at parseOptions (/app/api/node_modules/mongodb/lib/connection_string.js:272:15)\n at new MongoClient (/app/api/node_modules/mongodb/lib/mongo_client.js:48:63)\n at NativeConnection.createClient (/app/api/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:288:14)\n at NativeConnection.openUri (/app/api/node_modules/mongoose/lib/connection.js:738:34)\n at Mongoose.connect (/app/api/node_modules/mongoose/lib/index.js:404:15)\n at Object.connect (/app/api/dist/db.js:55:34)\n at Object.createApplication (/app/api/dist/server.js:64:18)\n at /app/api/dist/api.js:6:32\n at Object. (/app/api/dist/api.js:8:3)\n at Module._compile (node:internal/modules/cjs/loader:1256:14)"},"msg":"Unable to connect to database","time":"2023-08-20T21:04:22.625Z","v":0}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant