MongoError: not authorized on conduit to execute command { dropDatabase: 1, writeConcern: { w: 1 }
semmiverian opened this issue · 1 comments
semmiverian commented
Environment info:
mongo
version (v3.4.5
):node
version (v8.1.3
):npm
version (5.0.3
):yarn
version (v0.27.5
):
Problem description:
hi @kentcdodds i've been following your course at frontendmasters and got an error when try tu run npm run setup
i think is related with the mongo but i don't know what to do about this
i've got this corresponding error
stopping mongod with `mongo admin --eval "db.shutdownServer()" --port 27017 &>/dev/null` (in case it is running)
starting mongod with `mongod --dbpath /Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/.mongo-db --port 27017 &>/dev/null`
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `mongod --dbpath /Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/.mongo-db --port 27017 &>/dev/null'
generating and inserting data with `cd api && ./node_modules/.bin/babel-node scripts/generate`
connected. dropping everything
there was an error inserting things!
{ MongoError: not authorized on conduit to execute command { dropDatabase: 1, writeConcern: { w: 1 } }
at Function.MongoError.create (/Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/api/node_modules/mongodb-core/lib/error.js:31:11)
at /Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/api/node_modules/mongodb-core/lib/connection/pool.js:483:72
at authenticateStragglers (/Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/api/node_modules/mongodb-core/lib/connection/pool.js:429:16)
at Connection.messageHandler (/Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/api/node_modules/mongodb-core/lib/connection/pool.js:463:5)
at Socket.<anonymous> (/Users/Semmiverian/Documents/Learning/Testing JavaScript Applications (feat. React and Redux)/testing-workshop/api/node_modules/mongodb-core/lib/connection/connection.js:319:22)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:252:12)
at readableAddChunk (_stream_readable.js:239:11)
at Socket.Readable.push (_stream_readable.js:197:10)
at TCP.onread (net.js:589:20)
name: 'MongoError',
message: 'not authorized on conduit to execute command { dropDatabase: 1, writeConcern: { w: 1 } }',
ok: 0,
errmsg: 'not authorized on conduit to execute command { dropDatabase: 1, writeConcern: { w: 1 } }',
code: 13,
codeName: 'Unauthorized' }
stopping mongod process with `mongo admin --eval "db.shutdownServer()" --port 27017 &>/dev/null`
thanks for the help and the course man you help me a lot 👍
kentcdodds commented
Hi @semmiverian!
I'm sorry, I'm not sure what the problem is. You might try asking on StackOverflow. Good luck!