Author: Basir

Hi, I’m Bassir Jafarzadeh > Udemy programming teacher with 20K students > 5 years of tutoring experience for hundreds of students in Canada > 15 years of web development experience in companies like ROI Vision in Montreal
Asked a question
Links to products don’t work on the order description page

Answer: in this line: https://github.com/basir/next-tailwind-amazona/blob/main/pages/order/%5Bid%5D.js#L220 we don't save slug in the db. in this line: https://github.com/basir/next-tailwind-amazona/blob/main/models/Order.js#L8...

6 days ago 2
Asked a question
Google Login Error: Login failed {error: 'popup_closed_by_user'}

Login failed {error: 'popup_closed_by_user'} can u hlp me with above error? Answer: Use this package instead: https://developers.google.com/identity/one-tap

September 20, 2022 2
Asked a question
Invalid Token when trying to update the details

Answer: invalid token happens when the token exist but it can't be decrpted. re-login and make sure you use same secret key to sign and verify token.

September 18, 2022 2
Received an upvote
September 17, 2022 10
Asked a question
Webpack Error: -watch-content-base is not a valid argument

Answer: try this: npm install --save-dev [email protected] [email protected] [email protected] or instead of install [email protected] use latest webpack and change the commend in package.json like...

September 17, 2022 2
Asked a question
Proxy error: Could not proxy request

while inspecting the element, under Network/Fetch/XHR/preview, I am getting following error--> Proxy error: Could not proxy request /api/products from localhost:3000 to http://localhost:5000/ (ECONNREFUSED)....

September 17, 2022 2
Posted an answer
Cannot read properties of undefined (reading ‘searchKeyword’)

to fix this issue, in this line: https://github.com/basir/node-javascript-ecommerce/blob/master/frontend/src/srceens/ProductListScreen.js#L36 put {} inside function call: const products = await getProducts({});...

September 17, 2022 5
Asked a question
Cannot read properties of undefined (reading 'searchKeyword')

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'searchKeyword') at getProducts (api.js:29:30) at Object.render (ProductListScreen.js:40:84) at router (index.js:74:33)...

September 17, 2022 2
Selected an answer as best
September 17, 2022 2
Answer was selected as best
How are you able to return the html tags inside HomeScreen file?

hello there, by setting innterHTML in this line: https://github.com/basir/node-javascript-ecommerce/blob/master/frontend/src/utils.js#L22

September 17, 2022 10
Asked a question
Hydration failed because the initial UI does not match what was rendered on the server

error: 'Hydration failed because the initial UI does not match what was rendered on the server.' when setting badgeContent to {state.cart.items.length} because the badge component className on the server...

September 17, 2022 2
Asked a question
Cast to ObjectId failed for value "profile" (type string) at path "_id" for model "User"

Answer: you need to move /profile function above /:id function in userRoutes.js

September 16, 2022 2
Asked a question
Order validation failed: user: Path `user` is required

Answer: it says you didn't set user in order model here: https://github.com/basir/mern-amazona/blob/master/backend/routes/orderRoutes.js#L32 use console.log(req.user) to see what you pass to db and...

September 16, 2022 2
Asked a question
No longer able to path to the createMuiTheme function

createTheme is the newer name, createMuiTheme is deprecated https://github.com/elyra-ai/elyra/pull/1885. You are correct createTheme() is used to apply different default styles to the Mui components...

September 16, 2022 2
Posted an answer
PayPal: We’re sorry. This seller doesn’t accept payments in your currency

Simply log in to the merchant account probably a sandbox account (Example: [email protected]). Then open settings page by clicking on the gear icon at the top right corner of your dashboard....

September 16, 2022 5
Asked a question
PayPal: We’re sorry. This seller doesn’t accept payments in your currency

Payment time getting this error "We’re sorry. This seller doesn’t accept payments in your currency. Please return to the seller and choose another way to pay." from PayPal.

September 16, 2022 2
Posted an answer
I want to work under you

hello there, Thanks for your interest. I need help in answering question in this website. can you fix students issues in react, node, MongoDB, ...?

September 15, 2022 5
Posted an answer
connecting backend with frontend

please be more specific about your issue. what error do you get? send screenshot and console log and terminal log to find the issue please.

September 15, 2022 5
Posted an answer
MongoParseError: option usecreateindex is not supported

From the Mongoose 6.0 docs: useNewUrlParser, useUnifiedTopology, useFindAndModify, and useCreateIndex are no longer supported options. Mongoose 6 always behaves as if useNewUrlParser, useUnifiedTopology,...

September 15, 2022 5
Asked a question
MongoParseError: option usecreateindex is not supported

UnhandledPromiseRejectionWarning: MongoParseError: option usecreateindex is not supported. I have this error while connection. Can u please tell me about it

September 15, 2022 2
Load More