-
Notifications
You must be signed in to change notification settings - Fork 90
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
Find exercise: connect callback parameters have changed in current version #69
Comments
In order to continue using the db object we have to npm uninstall mongodb and then npm i mongodb@2.2.33 |
Why would we want to stick with an old version of MongoDB instead of updating the course material? It's a bad idea to teach people things that won't work with the current version of MongoDB. Besides that, I'm talking about a relatively small change to a single block of text, not an overhaul of the course. |
Because learnyoumongo is all about teaching the concepts of node which may be easier to do with more stable versions. Its just a suggestion |
@ionakathryn What are you talking about? This is learnyoumongo, not learnyounode. NPM packages, like mongodb which implemented this change, follow a semantic versioning convention. Stable doesn't mean anything here. The change was made in a major release. However, it is stable in the literal sense of the word... It's not going to be reverted and there are not going to be any breaking API changes until the next major release. The concepts of mongo that we're trying to teach and learn here are how to connect to a database and perform CRUD operations on it. That will only be harder to do with instructions and example code that don't work. Requiring installation of an older version of a driver without documenting it or explaining why is going to leave people without the ability to perform these basic tasks in this tutorial or a real development environment. |
That was a typo. Yeah there are some issues in learnyoumongo, for example console.log doesn't seem to work for a few of the exercises. To be honest I have been running mongodb@2.2.33 and encountered no issues other than console.log not working, however think this is by design and believe it has nothing to do with versioning. Please let me know if this is not the case. The exercises do not require the installation of a previous version and I have not said this. I mentioned that a workaround would be to install mongodb@2.2.33. I didn't advise users to do this, I simply mentioned it as a workaround.
As mentioned above, I have been able to perform all these tasks with mogodb@2.2.33 with no problems regarding versioning. |
@ionakathryn Maybe you are right and I really appreciate all your efforts to build this tutorial. However, I'm not pro like you. I'm just new to all this database thing. When I sucked up and even the solution cant help me I felt very upset. I even wanted to give up until I found this guy @VAggrippino 's helpful information and reference. Maybe changing couple lines of code is really easy for you which may not take you more than 5 mins. But it's really a big mess for me to learn something that doesn't work. Thanks to @VAggrippino again! And I'll appreciate if you do some change on the solution to help people like me :). |
I bet it will not take you senior programmers more than 10 min to change the hint in accordance to the current mongodb version change. But it took a entire Friday night for us noob programmers to find a solution to it and it has nothing to do with coding skill at all. Thanks @VAggrippino for pointing it out (thumbed up). Now we just have to struggle in between the newer version API and the older version instructions. Good luck to those who are trying to learn the "concepts" from those out-of-date hints. |
Unfortunately, the last commit to this repository was almost a year ago. I don't think anyone with the ability to make a change is paying attention any more. |
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:
The text was updated successfully, but these errors were encountered: