Build MERN-Stack ECommerce Website Like Amazon For Beginners [2022]

AI With Basir · 311K views · 2022 · 6:17:17

Open on YouTube

Web developmentEducation & learningtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when they are following the tutorial step by step and hit errors, such as Mongoose validation failures, ObjectId cast errors and 500 responses from the Express backend.

Recommended by 1 people across 1 different months, 2022 to 2023.

What it is

A 6+ hour beginner tutorial by Basir (AI With Basir) that builds a full MERN stack (MongoDB, Express, React, Node) e-commerce site modeled on Amazon. It covers setup, routing, product listing, cart, sign-in/sign-up, shipping and payment screens, and placing orders.

What people said

Recommends rize · 2022-03 · Stack Overflow · on “React - 500 Server Error when pressing a button”

I'm working on a podcast app that has an e-commerce section for which I am following this tutorial: [this video] I've been getting the following error from the network tab when I click the Place Order button: message: "Order validation failed: orderItems.0.product: Cast to ObjectId failed for value "1" (type string) at path "product", orderItems.0._id: Cast to ObjectId failed for value "1" (type string) at path "_id", orderItems.0.image: Path image is required., orderItems.1.image: Path image is required." In the console, there is this error: POST [LINK] 500 (Internal Server Error) I think this has to do with the images not showing up from the backend...it just has the <img> icon for when a photo

Cites Vidushika Dasanayka · 2022-05 · Stack Overflow · on “Mongoose ValidationError: Product validation failed: CountInStock: Path `CountInStock` is required”

I am a beginner to React.I am working in MERN stack project and I am following this [this video] tutorial. In my case, connection to the DB was success. However, I was unable to display products in my Home screen and when I tried with this link [LINK] nodemon app get crashed and display this error. (node:28916) [MONGODB DRIVER] Warning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead. (Use `node --trace-warnings ...` to show where the warning was created) D:\Github\Ecommerce-mern\backend\node_modules\mongoose\lib\document.js:2965 this.$__.validationError = new ValidationError(this); ^ ValidationError: Product validation failed: CountInStock: Path CountInStock is r

Cites Daniel · 2022-06 · Stack Overflow · on “Axios PUT request failed with 500 code Cast to ObjectId failed for value”

Hi, the problem is that I have [LINK] and profile is not a compatible mongoDB string, but I've seen a lot of people on youtube make it like this. This guy at 5:14:00 has the exactly code like mine and it's working for him : [this video] . And I've seen other examples too. I don't know how to do it, why doesn't work for me.

Cites Areetha Ma · 2023-01 · Stack Overflow · on “HomeScreen.js:12 Uncaught (in promise) AxiosError {message: 'Request failed with status code 500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE'”

I have tried a method in here as stackoverflow was recommending it for me but it didn't work or i did not know how implement them properly so please help me here. one i tried was this Proper way to return JSON using node or Express [LINK] . I have been stuck in this error for a whole day this is the package json in the front end { "name": "frontend", "proxy": " [LINK] ", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "axios": "^1.2.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.6.2", "react-scripts": "5.0.1", "web-vitals": "^2.1.4" }, "script