react-storefront-starter-app icon indicating copy to clipboard operation
react-storefront-starter-app copied to clipboard

Update Cart Is Not Working From The Cart Page

Open rajeev-k-tomy opened this issue 5 years ago • 1 comments

Bug report

When we try to update any of the cart items from the cart page, it prevents me to do so and throws an error

Describe the bug

The error is obviously happens when the SessionProvider tries to send a POST request to the nextjs API api/cart/update. This request failes with 500 error.

I can also see below error in the console

TypeError: resolver is not a function
    at apiResolver (/Users/rajeevktomy/Desktop/projects/javascript/rsf-db/node_modules/next/dist/next-server/server/api-utils.js:8:7)
    at DevServer.handleApiRequest (/Users/rajeevktomy/Desktop/projects/javascript/rsf-db/node_modules/next/dist/next-server/server/next-server.js:48:427)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Start the application npm start
  2. Load the application in the URL: http://localhost:3000/
  3. Add a product to the cart
  4. Visit the cart page
  5. Try to increment or decrement the quantity
  6. It ends up with an error popup

Expected behavior

It should increment or decrement the quantity of the quote item.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS Catalina 10.15.4
  • Browser: chrome, safari
  • Version of React Storefront: 8.15.1

rajeev-k-tomy avatar Sep 22 '20 07:09 rajeev-k-tomy

A pull request is created for this: #78

rajeev-k-tomy avatar Sep 22 '20 14:09 rajeev-k-tomy