notrab / headless-dropshipping-starter

Create your own dropshipping store with Next.js, Snipcart & Printful 👕
https://headlessdropshipping.com
712 stars 134 forks source link

New Products not updating on live server #57

Closed pythlang closed 2 years ago

pythlang commented 2 years ago

Hi, I'm having an issue where I can pull products on the localhost but whenever I run npm build (next build && next export) with an out directory being generated, I am noticing that there is no network call to printful to get an updated product manifest when uploading that directory to the live web server; instead, there is a shop.json cache which is being used instead.

Can you please help me fix this issue? This is a new site that I have not seen this on previously.

pythlang commented 2 years ago

This is the offending item that should not be here. Any idea how to fix this? I have been going through network calls and don't see it fetching from printful

Screen Shot 2022-03-25 at 08 27 41

pythlang commented 2 years ago

I was able to solve this.

notrab commented 2 years ago

Hey @pythlang

What seemed to be the issue? Sorry for not getting back to you sooner, I must have missed this when clearing notifications.

pythlang commented 2 years ago

Hey @pythlang

What seemed to be the issue? Sorry for not getting back to you sooner, I must have missed this when clearing notifications.

So, the behavior was expected since the server was only hosting a static front end and fetching the last cached version of the store since we were not running the backend code. I fixed this by running the site as intended: with node.

I do have another issue regarding the /api/ we hook for Shopify so I will open a new ticket

dpncode commented 1 year ago

Hi @pythlang , I have the same issue when hosting on my prod server. Can you advise how you resolved it? Thanks.