verswell-commerce template broken cart behavior #374
-
Hello, I am experiencing a cart caching issue while using the verswell-commerce template. It appears that cart cookies are somehow being cached on the server instead of on the client, resulting in a shared cart across all users on our store. (i.e. one user adds an item to a cart, all other visitors will see that cart until it is checked out...) I realize this is likely a nextjs issue, but I am posting here since I have not had luck in the nextjs forums, and I also cannot even run a fresh copy of the verswell-commerce template while attempting to reproduce. I get the error below, which I expect is related to the cause in my own application, except that mine made it to production without any errors. To me this error indicates that nextjs is attempting to write cookies from the server instead of the client, hence requestAsyncStorage not being available:
I have no idea why or how this is happening, it is extremely frustrating and is currently blocking our customers from checking out. Any tips for how to resolve this? Is the hosted version of the verswell-commerce template up to date with the repository? What kind of configuration is used in that template that is different from the one on github? Any help is greatly appreciated, this is currently a huge blocker for us right now. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey @Ethan-Guest, We can't replicate this issue on our end. Did you set up your project using the deploy button? This directly creates the repository with the correct settings on vercel. After that, you can clone the project directly from your github/gitlab/bitbucket repository. Make sure you are running node version > 18 and install using Please try this out and let us know, thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi,
|
Beta Was this translation helpful? Give feedback.
Hey @Ethan-Guest,
We can't replicate this issue on our end.
Did you set up your project using the deploy button? This directly creates the repository with the correct settings on vercel. After that, you can clone the project directly from your github/gitlab/bitbucket repository. Make sure you are running node version > 18 and install using
pnpm install
. Could you try this and check if the issue still occurs?Please try this out and let us know, thank you!