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

Error running the project on local #361

Closed
sandeepperkariappdev opened this issue Jan 1, 2020 · 2 comments
Closed

Error running the project on local #361

sandeepperkariappdev opened this issue Jan 1, 2020 · 2 comments

Comments

@sandeepperkariappdev
Copy link

sandeepperkariappdev commented Jan 1, 2020

I have cloned the project, replaced the MongoDB URI, with a new MongoAtlas URI, I try to run the project using yarn start, I see the following error, Can someone help me out ?

(node:66993) UnhandledPromiseRejectionWarning: MongoError: not authorized on admin to execute command { insert: "system.indexes", documents: [[{ns admin.sessions} {key [{expires 1}]} {name expires_1} {expireAfterSeconds 0} {unique false}]], ordered: true, writeConcern: { w: "majority" } }
at Function.MongoError.create (/Users/sandeep.perkari/Documents/sampleapps/nodejs/smndjs/node_modules/connect-mongo/node_modules/mongodb-core/lib/error.js:31:11)
at /Users/sandeep.perkari/Documents/sampleapps/nodejs/smndjs/node_modules/connect-mongo/node_modules/mongodb-core/lib/connection/pool.js:497:72
at authenticateStragglers (/Users/sandeep.perkari/Documents/sampleapps/nodejs/smndjs/node_modules/connect-mongo/node_modules/mongodb-core/lib/connection/pool.js:443:16)
at Connection.messageHandler (/Users/sandeep.perkari/Documents/sampleapps/nodejs/smndjs/node_modules/connect-mongo/node_modules/mongodb-core/lib/connection/pool.js:477:5)
at TLSSocket. (/Users/sandeep.perkari/Documents/sampleapps/nodejs/smndjs/node_modules/connect-mongo/node_modules/mongodb-core/lib/connection/connection.js:333:22)
at TLSSocket.emit (events.js:210:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at TLSSocket.Readable.push (_stream_readable.js:224:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23)
(node:66993) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:66993) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@sandeepperkariappdev sandeepperkariappdev changed the title Unable to run on Local I get this error Error running the project on local Jan 1, 2020
@sandeepperkariappdev
Copy link
Author

On mongodb atlas we select nodejs driver version 2.2 or later it works

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