Changes to code doesn't reflect on the locally served website

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?

Hi Benjamin,

A couple of questions to help us figure what might be happening here:

  1. Which version of the CLI are you running? Does updating the version change anything?
  2. When you save on your text editor - are you seeing in terminal that the files are changed?
  3. If you test with a different store using a fresh version of Dawn, are you seeing the same behavior?

Hi Liam,

I somehow hadn’t thought of updating the shopify-cli, and it seems to have solved it!

Simple.

Although I have new kind of errors, but that’s for later.

Thanks!