Lesson 17. Out pf stock button is not visible.
use console.log before return to see the value of product.countInStock is it number and is it 0?
Answer
use console.log before return to see the value of product.countInStock is it number and is it 0?
you need to move /profile function above /:id function in userRoutes.js. I mean move: [apcode language="jscript"]userRouter.put("/profile",isAuth, ...[/apcode] above [apcode language="jscript"] userRouter.put( "/:id",isAuth,isAdmin, ...[/apcode] like this: https://github.com/basir/mern-amazona/blob/master/backend/routes/userRoutes.js#L33
hello there, for Hydration fail error I update the cart link in the header menu on the client-side only using this code: https://github.com/basir/next-tailwind-amazona/blob/main/components/Layout.js#L19 Also check these solutions: https://github.com/vercel/next.js/discussions/35773 also this…
you get the proxy error when: 1- start frontend before the backend server 2- have an error in the backend terminal please run the backend server in the backend folder…
try this: npm install –save-dev [email protected] [email protected] [email protected] or instead of install webpack-cli@3 use latest webpack and change the commend in package.json like this: change in package.json webpack-dev-server to ‘webpack serve’
hello there, how do you upload from utils/images? share the code and use consol.log to see what you pass as value to image field in product model. is it string…
hello there, in backend: npm i stripe then create stripeRouter.js like this: /* eslint-disable camelcase */ import Stripe from 'stripe'; import express from 'express'; import config from '../config.js'; import Order…
hello there, the issue is in getting password from db. use console.log there to see what you get from db to compare with input form password. read this please: https://stackoverflow.com/questions/44871280/error-illegal-arguments-string-undefined-and-stop-server-in-node-js
you are try to convert a js object to JSON to send over socket.io you can send only simple object not complex object with not primitive data type. try to…
hello there, send me the link of heroku app to take a look. also share the heroku logs here please.