question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Find exercise: connect callback parameters have changed in current version

See original GitHub issue

In the current version of the Node.js MongoDB Driver, the second argument to the MongoClient.connect() callback has changed from a database object to the MongoClient instance.

There are a few changes that should be made to the hint section in order to make it consistent with the current API.

It should also be noted that the close() method is now called on the client instance rather than the database object.

The resources should probably also reference the current API documentation for the Collection’s find method: http://mongodb.github.io/node-mongodb-native/3.0/api/Collection.html#find

Reference:

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:4
  • Comments:8

github_iconTop GitHub Comments

3reactions
i0na-kcommented, Mar 20, 2018

In order to continue using the db object we have to npm uninstall mongodb and then npm i mongodb@2.2.33

2reactions
i0na-kcommented, Mar 21, 2018

Because learnyoumongo is all about teaching the concepts of node which may be easier to do with more stable versions. Its just a suggestion

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to access 'response' parameter of app.get in callback ...
It's fine to use non-async functions with then provided the function expects one parameter and returns the processed result, so the first ...
Read more >
Handle configuration changes - Android Developers
Your app will receive a callback when the configurations do change so that you can manually update your activity as necessary.
Read more >
Tracing — Tutorial - NS-3
Okay, I found a trace source and the Config path, how do I figure out what the return type and formal arguments of...
Read more >
Understanding the Event Loop, Callbacks, Promises, and ...
JavaScript will run the current frame (or function call in a ... Whenever the call stack is empty, the event loop will check...
Read more >
AASM - Ruby state machines - GitHub
AASM started as the acts_as_state_machine plugin but has evolved into a more generic library that ... Add comma separated parameter for guards and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found