-
Type: Task
-
Resolution: Done
-
Priority: Blocker - P1
-
None
-
Affects Version/s: 3.0.4
-
Component/s: MongoDB 3.4
-
Environment:node.js with mongodb from npm on windows server
-
Empty show more show less
I'm getting this error: MongoError: user is not allowed to do action [find] on [testdb.$cmd]
The issue is, I can connect to the database using mongo shell and it does everything I want just fine, but when I try it using node.js it always gives me that error when I connect to the database and try to do any actions. Here is the basic code I'm using to connect:
var uri = 'mongodb+srv://cluster0-woivk.mongodb.net/testdb' MongoClient.connect(uri, {user: 'PaperDoom', password: 'TotallyNotReal'}, (err, db) => { if (err) console.log(err) //do stuff. })