Hi all,
I’ve been working on a Shopify store for over a year now, using Shopify CLI to develop new functionalities locally before pushing them live through the GitHub repository.
Lately the local server doesn’t seem to be updated when I save changes, or more accurately, it knows changes have happened as the page reloads, but the changes don’t show. It seems evens display the live site rather than local changes, for some reason.
For example:
- My production website is showing only GB and US in the country selector dropdown, which is correct.
- I edit my country-localization.liquid file localy to show 4 countries in total, DE, NL, GB and US.
- If I run
shopify theme dev
the website gets served on 127.0.0.1:9292. - I see that my country selector does indeed show the 4 countries, which mean the local changes are applied.
- BUT, if I go back to my code and delete one of the countries (let’s say NL) and save the changes, the website does automatically reloads, but the changes do not reflect. It should be showing DE, US and GB, but I’m only seeing US and GB (which is what I have set live)
- If I type CMD + C in the Terminal to stop serving the website, and then launch the
shopify theme dev
command line again, the changes show up as it should (I see the 3 countries)
This is an example with country-localization, but it’s not specific to this. Any changes seem to confuse the local server, and it displays the latest live version it has (it seems like).
Conclusion: It seems that locally, if I want to see my changes reflected on localhost, I need to stop running “shopify theme dev” and run it again, which is far from ideal.
What’s happening? Any ideas?