I taught over 25 years in schools and colleges. Brad is really great teacher. Comprehensive knowledge, very clear and straight to the point. Could you please include ( MERN Stack: MongoDB, Express, React & Node.js Full Project) in Udemy Brad? Thanks.
I discovered something interesting that you need to know and explore further, perhaps. I'm Brazilian, I'm 70 years old, my English isn't very good and I still have some hearing difficulties. And it's not because of my age! Your speech, diction and the pauses between words make the Google translator perfectly translate from English to Portuguese. It's like reading a book edited in Portuguese. Incredible!! my name is Jorge
Awesome! Just a remark: I edited this line of code due to Connection Error: (added .MongoClient at the end) const mongodb = require('mongodb').MongoClient
Came here from the JS course.... the MongoDB setup is outdated, there are now many more options we're presented with not covered in any of your course material or web series. For a first time user of Mongo, this is creating some concern... Figured most of it out, and the one thing I had to go to SO for, this was the thing: mongodb.connect is no longer a valid function as it stands. You must use MongoClient. The easiest way to fix this is to use this with the declaration: const mongodb = require("mongodb").MongoClient. Simply adding that period and MongoClient at the end seems to have fixed it. There are other ways to go about this, but that is by far the simplest fix. Thank you for all your courses, you're the only teacher I've found in coding that is ACTUALLY teaching and not just telling people to watch them code and learn by some sort of magical telepathy that doesn't exist. Like asking a med student to learn how to perform a heart transplant by only watching one and following along with no practical knowledge or experience... would you trust that person to perform surgery on you!?
I had this problem as well and it is fixed now, but another error pops up saying for line 6 "const db = client.db()". The error says "TypeError: Cannot read properties of undefined (reading 'db')". Anyone know how to fix this?
@@Gibdo_ Can't find this in my code... might sound silly, but if I remember correctly, it may solve it simply by changing 'const' to 'let.' It's possible the db variable needs to be reassigned later on.
Very impressive teaching style, clear, consistent, precise, almost mesmerising ! Would be great to see a lesson on relational database (MySQL), as a beginner, I am, like many learners, still not clear when to choose which type of database, eg. when building a ecommerce website that requires Multi tiers filtering function.
Great series! You cover a lot here and in your udemy course (and I’m a student in 3 of them), but what you’re missing is email integration. I basically have everything I need to create a mini SaaS, but connecting it with a custom domain, and having my netlify app email user notifications and updates from @domain would be really helpful. Hope you’ll make a video on that one day soon :-)
Regarding the 'mongodb.connect is not a function' error. You will need to add ".MongoClient" to your mongodb variable like so..... const mongodb = require("mongodb").MongoClient;
Please we need in-depth tutorial on firebase! Also, will we create a big project at the end of this bootcamp series, using all the knowledge we've learnt (and will learn) together just like the real world?.
@@STUPIDRUclips_HIDINGMSGS I know firebase, but I need in depth tutorial. An advanced guide sort of. I hv already watched all videos of Ninja on firebase. They are very basic, and doesn’t teach real world project.
@@STUPIDRUclips_HIDINGMSGS nah, Im still learning, I want to use firebase in my project. But I can’t visualize all the different firebase products working together in most efficient way. That what I’m lacking.
Hello sir, im learning fullstack course from udemy . Your way of teaching is just immaculate for me to learn many things in java script. But during the process, i came across an error "typeerror: mongodb.connect is not a function " . I tried to fix it but still getting same error. Please help if im missing something here......
Brad offers wonderful instruction. However, in the MongoDB/CRUD video, I get this error: TypeError: mongodb.connect is not a function at Object. (C:\Users\David McMurrey\Desktop\mongodb-node-test\index.js:6:9) I added .MongoClient as indicated by joel-rg below. Now it just hangs. -- david
Excellent video as usual Brad. I have already finished 2 of your udemy courses and I just purchased 2 more. Looking forward to them. I was wondering if you would consider putting together some PHP/SQL courses and/or a RUclips series? I know they are not super modern and trendy now like React and MongoDB but do you think in the future you might publish courses related to those topics? Or even React/Angular/Vue ones? Thank you
Hi, thanks so much! You're right, even if PHP/SQL aren't super trendy, if we look at job boards it's clear they're super in-demand which really is what's most important. Even though in the real world it makes sense to jump right into Laravel or WordPress I do think a PHP/SQL essentials course would be useful. I'd like to cover Vue at some point!
Thank you, Brad. It was a great introduction to MongoDB. I have already enrolled your React.js course and I am really happy. I consider purchasing also a NodeJs course and I think I have to pick your full-stack course? at this point, I wonder that which template are you using for front-end side? ejs, handlebars or pug? Thank you.
Thanks! We use EJS for the server-side-rendered HTML in the Full-Stack Node.js course. We do also write front-end JS for several features, but we don't use a library like React or Vue, just plain JS.
@@LearnWebCode I've actually been following along with the full-stack javascript course and I'm kinda stuck. In the course, you use: the db.collections().insertOne method to create a new document then you use res.json(info.ops[0]) to return the same document that was just inserted. It would seem that the insertOne() method doesn't work that way anymore. I was redirected to use mongoose to do what you did and I'm hoping I succeed. Any feedback would be highly appreciated.
mongodb.ObjectId("therespectiveid") gave me an error as mongodb.ObjectId is not a function. to solve it, at the top I had to declare, const ObjectId = require("mongodb").ObjectId
when you get data back from mongodb is that a string? if i console log "results" i get back an object looking response but when try to access one of the items, console log "results.name" for example i get undefined. basically im trying to find out how to access and use items from a mongodb object in node
the answer incase anybody else is wondering is that it is an array of objects, "results[0].name" gives the result i was looking for. probably im the only idiot who took a couple hours to realise that
mongodb.ObjectId gives me an error. To fix it I need to write ObjectId instead mongodb.ObjectId and in the beggining of the document to write const {ObjectId} = require("bson")
I have been trying to update some fields of an API for two long weeks and still cannot do it. How to update data from a req.body please (I trying to update data from user or Postman but it returns Null not the updated data), Thank you very much in advance.
Is it an API that you created, or an existing one with documentation? I don't think it's a technical / coding problem, instead maybe the API is expecting something that you're not passing along to it?
@@LearnWebCode I created it. thank you. Maybe in the future you can do an express API example? it would me great unfortunately I looked up on google all APIs > crud are created with and done with Mongoose. not with mongodb node driver.
Yep! Well, it's not exactly the same as in a SQL system, but it's been useful for me, check this documentation page out: docs.mongodb.com/manual/reference/operator/aggregation/lookup/
Hi, for a different project, just this morning I was testing MongoDB 5.0.1 via Docker and the traditional approaches I use in this video were working, although it was a slightly different project. Are the errors you were getting just related to opening the initial connection? Or on a certain action?
@@LearnWebCode Brad Thank you again, I apologize, but I didn't realize that you answered so long ago. The anouncement you made in udemy course, Learn JavaScript: Full-Stack... on the mid of october "npm install mongodb@3.7.2" solved the isue perfect.
I'm sorry man IDK about those comments, but I didn't like how you just skip some really useful things and how u stop at a useless topic and talk about it for about 2 or 3 minutes ...
@@LearnWebCode Yeah. I'm amazed by the the cryptocurrency stuffs he was talking about. He really got emotional while explaining his discovery of finding the efficiency algorithms for reducing the delay for transactions. Really exciting stuffs. 🔥
Hi Brad, why teach MongoDB/ NoSQL database when in most (99%) real world ( professional environments) you should know SQL and work with for example MySQL, PostgreSQL, MsSQL or Oracle Databases? for me this video, make no sense and waste of time because one thing is choose between PHP and NodeJS, a complete thing is about databases, that majority of the companies use a SQL Database. ;)
Broo... You are the BEST Instructor EVER!!!!!
The best instructor i've ever found on youtube. Btw, waiting for Firebase ❤️
I taught over 25 years in schools and colleges. Brad is really great teacher. Comprehensive knowledge, very clear and straight to the point. Could you please include ( MERN Stack: MongoDB, Express, React & Node.js Full Project) in Udemy Brad? Thanks.
I discovered something interesting that you need to know and explore further, perhaps.
I'm Brazilian, I'm 70 years old, my English isn't very good and I still have some hearing difficulties. And it's not because of my age!
Your speech, diction and the pauses between words make the Google translator perfectly translate from English to Portuguese.
It's like reading a book edited in Portuguese.
Incredible!!
my name is Jorge
Awesome!
Just a remark: I edited this line of code due to Connection Error: (added .MongoClient at the end)
const mongodb = require('mongodb').MongoClient
Thank you, i really appreciate this.. i got stuck in that part too.
Thank you Joel... I got stuck here and wasted at least an hour
Came here from the JS course.... the MongoDB setup is outdated, there are now many more options we're presented with not covered in any of your course material or web series. For a first time user of Mongo, this is creating some concern...
Figured most of it out, and the one thing I had to go to SO for, this was the thing:
mongodb.connect is no longer a valid function as it stands. You must use MongoClient. The easiest way to fix this is to use this with the declaration: const mongodb = require("mongodb").MongoClient. Simply adding that period and MongoClient at the end seems to have fixed it. There are other ways to go about this, but that is by far the simplest fix.
Thank you for all your courses, you're the only teacher I've found in coding that is ACTUALLY teaching and not just telling people to watch them code and learn by some sort of magical telepathy that doesn't exist. Like asking a med student to learn how to perform a heart transplant by only watching one and following along with no practical knowledge or experience... would you trust that person to perform surgery on you!?
I had this problem as well and it is fixed now, but another error pops up saying for line 6 "const db = client.db()". The error says "TypeError: Cannot read properties of undefined (reading 'db')". Anyone know how to fix this?
@@Gibdo_ facing same error
@@Gibdo_ Can't find this in my code... might sound silly, but if I remember correctly, it may solve it simply by changing 'const' to 'let.' It's possible the db variable needs to be reassigned later on.
Very impressive teaching style, clear, consistent, precise, almost mesmerising !
Would be great to see a lesson on relational database (MySQL), as a beginner, I am, like many learners, still not clear when to choose which type of database, eg. when building a ecommerce website that requires Multi tiers filtering function.
Best ever instructor! Love you, sir!
The best place to learn ... very good content... your voice is very clear ..
Great series! You cover a lot here and in your udemy course (and I’m a student in 3 of them), but what you’re missing is email integration. I basically have everything I need to create a mini SaaS, but connecting it with a custom domain, and having my netlify app email user notifications and updates from @domain would be really helpful.
Hope you’ll make a video on that one day soon :-)
Clear and straight to the point, great tutorial, I've subscribed!
You are an amazing teacher, your explanations are short and sweet which really helps me understand the concept even better!
A great tutorial on performing CRUD operations on a Mongo Database. Thanks, Brad
{2021-11-29}
You're the best instructor anyone can ever have.
Regarding the 'mongodb.connect is not a function' error. You will need to add ".MongoClient" to your mongodb variable like so..... const mongodb = require("mongodb").MongoClient;
Thanks
Thank you very much!!
Really excellent video tutorial.
Great tutorial! Thank you!!!
If you ever thought you were not clever enough to study a subject, just ask Brad to teach it. Can you move into nuclear physics?
yeeeah!! New bootcamp episode!!
Your tutorials are the TRUE zero to hero.. Thanks You!! Also waiting for firebase
Love From Bangladesh Sir
please make more such videos really helpful. start making some mini projects with MERN stack
Eagerly waiting ❤️
I noticed the Dental braces. Hope your are Okay. 🤔
Half way through this video. Already learned a lot. 👏
Thanks for the quality content. 💚
😂 the braces finally get to come off pretty soon here! Thanks for the support 💚
I am here... thank you...
Please we need in-depth tutorial on firebase!
Also, will we create a big project at the end of this bootcamp series, using all the knowledge we've learnt (and will learn) together just like the real world?.
If you still can't find a good tutorial on Firebase, search Shaun Pelling's YT channel.
@@STUPIDRUclips_HIDINGMSGS I know firebase, but I need in depth tutorial. An advanced guide sort of. I hv already watched all videos of Ninja on firebase. They are very basic, and doesn’t teach real world project.
@@whoman7930 Do medium to big companies use Firebase? What sort of real-world application, do you use it in your company?
@@STUPIDRUclips_HIDINGMSGS nah, Im still learning, I want to use firebase in my project. But I can’t visualize all the different firebase products working together in most efficient way. That what I’m lacking.
10/10
at the newer version you cant use let mongodb = require("mongodb").MongoClient
in order to make the connect يا براد يا غالي يا فلاح
Hello sir, im learning fullstack course from udemy . Your way of teaching is just immaculate for me to learn many things in java script. But during the process, i came across an error "typeerror: mongodb.connect is not a function " .
I tried to fix it but still getting same error. Please help if im missing something here......
I'm getting the same error...have you fixed it?
I just found it in the comments. You have to modify this:
const mongodb = require("mongodb").MongoClient;
You are the BEST!
Brad offers wonderful instruction. However, in the MongoDB/CRUD video, I get this error: TypeError: mongodb.connect is not a function
at Object. (C:\Users\David McMurrey\Desktop\mongodb-node-test\index.js:6:9)
I added .MongoClient as indicated by joel-rg below. Now it just hangs.
-- david
hey, there is an error message, it says ''' mongodb.connect is not a function
I have the same problem
Please make a video on how to use any API documentation for beginners
Excellent video as usual Brad. I have already finished 2 of your udemy courses and I just purchased 2 more. Looking forward to them. I was wondering if you would consider putting together some PHP/SQL courses and/or a RUclips series? I know they are not super modern and trendy now like React and MongoDB but do you think in the future you might publish courses related to those topics? Or even React/Angular/Vue ones? Thank you
Hi, thanks so much! You're right, even if PHP/SQL aren't super trendy, if we look at job boards it's clear they're super in-demand which really is what's most important. Even though in the real world it makes sense to jump right into Laravel or WordPress I do think a PHP/SQL essentials course would be useful. I'd like to cover Vue at some point!
@@LearnWebCode that sounds great. I have already finished the WP course. I will definitely keep an eye on the upcoming videos and courses 👍
Brad you're my favourite instructor. Please react..
Thanks! My reaction: 🙂
@@LearnWebCode pretty sure he was asking for the react js series 😅😅
waiting for user auth video :)
Thank you, Brad. It was a great introduction to MongoDB. I have already enrolled your React.js course and I am really happy. I consider purchasing also a NodeJs course and I think I have to pick your full-stack course? at this point, I wonder that which template are you using for front-end side? ejs, handlebars or pug? Thank you.
Thanks! We use EJS for the server-side-rendered HTML in the Full-Stack Node.js course. We do also write front-end JS for several features, but we don't use a library like React or Vue, just plain JS.
@@LearnWebCode I've actually been following along with the full-stack javascript course and I'm kinda stuck. In the course, you use: the db.collections().insertOne method to create a new document then you use res.json(info.ops[0]) to return the same document that was just inserted. It would seem that the insertOne() method doesn't work that way anymore. I was redirected to use mongoose to do what you did and I'm hoping I succeed. Any feedback would be highly appreciated.
TypeError: mongodb.connect is not a function, Does anyone know the solution to this problem?
I'm looking for the answer too. I created class with MongoClient though but now I'm stuck on MongoClient.ObjectId is not a constructor error.
mongodb.ObjectId("therespectiveid")
gave me an error as
mongodb.ObjectId is not a function.
to solve it, at the top I had to declare,
const ObjectId = require("mongodb").ObjectId
u r
Is the next video coming up tomorrow?
when you get data back from mongodb is that a string? if i console log "results" i get back an object looking response but when try to access one of the items, console log "results.name" for example i get undefined. basically im trying to find out how to access and use items from a mongodb object in node
the answer incase anybody else is wondering is that it is an array of objects, "results[0].name" gives the result i was looking for. probably im the only idiot who took a couple hours to realise that
Tried everything why is error.." TypeError: mongodb.ObjectId is not a function" ... when trying deleteOne function ?
@Giovanni Adorno Thank you.
mongodb.ObjectId gives me an error.
To fix it I need to write ObjectId instead mongodb.ObjectId and in the beggining of the document to write
const {ObjectId} = require("bson")
thanks!
Ye ye ye whatever...now where's the cat?!! Only kidding.
I have been trying to update some fields of an API for two long weeks and still cannot do it. How to update data from a req.body please (I trying to update data from user or Postman but it returns Null not the updated data), Thank you very much in advance.
Is it an API that you created, or an existing one with documentation? I don't think it's a technical / coding problem, instead maybe the API is expecting something that you're not passing along to it?
@@LearnWebCode I created it. thank you. Maybe in the future you can do an express API example? it would me great unfortunately I looked up on google all APIs > crud are created with and done with Mongoose. not with mongodb node driver.
Is there a way to join two different collections in Mongodb?
Yep! Well, it's not exactly the same as in a SQL system, but it's been useful for me, check this documentation page out: docs.mongodb.com/manual/reference/operator/aggregation/lookup/
Brad Due to the changes of mongodb V5 the code needs to be updated, it is sending errors. Thank you very much
Hi, for a different project, just this morning I was testing MongoDB 5.0.1 via Docker and the traditional approaches I use in this video were working, although it was a slightly different project. Are the errors you were getting just related to opening the initial connection? Or on a certain action?
@@LearnWebCode
Brad Thank you again, I apologize, but I didn't realize that you answered so long ago. The anouncement you made in udemy course, Learn JavaScript: Full-Stack... on the mid of october "npm install mongodb@3.7.2" solved the isue perfect.
in 2021 its saying db is undefined
34:30 How to use ObjectId on mongodb => { _id: mongodb.ObjectId("bbdb3b3bb4bb2bb2bb4bb4bbb") }
Not working version error still
What does the error message say?
@@LearnWebCode async function without a catch block or by rejecting a promise........
I'm sorry man IDK about those comments, but I didn't like how you just skip some really useful things and how u stop at a useless topic and talk about it for about 2 or 3 minutes ...
weird....his voice sounds just like Bucky Roberts....thenewboston
Haha, did you see he just posted to RUclips last week for the first time in years? Pretty cool stuff 🥳
@@LearnWebCode Yeah. I'm amazed by the the cryptocurrency stuffs he was talking about. He really got emotional while explaining his discovery of finding the efficiency algorithms for reducing the delay for transactions. Really exciting stuffs. 🔥
Are folks still using node.
Do you know of any better option?
Hi Brad, why teach MongoDB/ NoSQL database when in most (99%) real world ( professional environments) you should know SQL and work with for example MySQL, PostgreSQL, MsSQL or Oracle Databases? for me this video, make no sense and waste of time because one thing is choose between PHP and NodeJS, a complete thing is about databases, that majority of the companies use a SQL Database. ;)