Why isn't my local Shopify theme dev rendering changes?

manuelpineda
Shopify Partner
9 0 3

I run shopify theme dev and it does not render any changes to the local theme. When I open the theme editor or the live preview link for that theme I can see all the changes, settings etc. Just the local host that is not working properly for me. I also updated the CLI and themes packages and nothing works. I also restarted my computer.

Replies 17 (17)

ed_meehan
Shopify Partner
15 1 7

Having a similar issue, I can run the command "shopify theme dev" with no errors, but my localhost is showing the published theme and not my local files. This started yesterday on one compuer, and I was unable to find a solution. I then had to switch to my laptop, but 24 hours later this computer is also doing it.
Both computers are running MacOS 14.3.1, the imac is running Shopify CLI version: 3.56.2, and powerbook is running 3.55.4

I don't see any errors when I use the CLI, and I have been using the CLI for months with no issues, the day of the issue I have not updated any software.
The only action I feel can be tied to this issue was I did a "shopify theme pull" of a theme just before the issue (I keep my local files on git, so I can see that this pull is not the issue). I have uninstalled and installed the CLI multiple times and removed the cache directory, also tried logout and login on the CLI but none of this has solved it.

Now that both computers are doing it I really need a solution since now I am not able to do any local development. If no one else is having this issue then maybe this is local to my network, but if anyone else is experiencing this issue please let me know... if a solution is found please post it here. I will gladly buy a cup of coffee for anyone with a solution that works.

manuelpineda
Shopify Partner
9 0 3

I have been struggling with this all morning, I will have to use another computer and haveing to setup my entire work environment wil be a pain. Hope we can find a solution for this.

 

ed_meehan
Shopify Partner
15 1 7

Are you able to confirm that the version of the theme you are seeing on your localhost is the published theme? If so your error is the same as mine. When I am running the "shopify theme dev" and make a change to the file I see the changed file in the log, and see the localhost flicker, but it still serves the published theme files and not my local files.

manuelpineda
Shopify Partner
9 0 3

yes, I checked and it is using the same theme as the current live one. I also changed stores and it is using the live theme as well.

 

ed_meehan
Shopify Partner
15 1 7

Are you working on any other Shopify projects on this computer, can you confirm that all local development is having the same issue? Mine is the same across multiple projects, "shopify theme dev" runs with no issue, but serves the published site and not the localhost files.

This feels like a network issue given the timing and the fact that two of my computers are having the same issue on different versions of the CLI.

I am going to test if getting my local network IP reset helps the issue.

 

ed_meehan
Shopify Partner
15 1 7

I found an open bug on the CLI github, this is a known issue, we are not alone:
https://github.com/Shopify/cli/issues/3466

RomaNovomodnyi
Shopify Partner
2 0 0

Thank you @ed_meehan adding ?preview_theme_id=xxx works well for me. 

ed_meehan
Shopify Partner
15 1 7

Might be coincidence, but I reset my router and for a moment it worked and I was able to server my local files using the CLI. I was excited to see if this was the solution and tested my other computer and found it was not fixed. Then when I returned to my computer that had worked and did a refresh, found that it was not working again.

This really feels like a network issue of some sort because of the timing and the fact it has impacted two of my computers at different times.

manuelpineda
Shopify Partner
9 0 3

I think it will be fixed eventually but for the time being I am using the work around I saw on the Github post `http://127.0.0.1:9292/?preview_theme_id=xxx`. Thanks a lot for that link it saved me!!

 

EcaterinBosince
Shopify Partner
1 0 4

It seems to be an issue NOT related to the version of the CLI, but on Shopify's infrastructure.

The solution on the GIthub bug page worked for us too.

 

For anyone wanting to quickly find their theme id, it is shown in your terminal when starting theme dev:

 

[1] http://127.0.0.1:9292
[2] https://shop-id.myshopify.com/admin/themes/1234567890/editor
[3] https://shop-id.myshopify.com/?preview_theme_id=1234567890

In the above example, your theme ID is 1234567890 and you should run
`http://127.0.0.1:9292?preview_theme_id=1234567890 `
to make the local preview work again.

 

 

 

jwilson114
Shopify Partner
3 0 0

This worked for me. Thanks

CindyMoraDev
Shopify Partner
1 0 0

Another possible solution, is to run the preview in incognito

mcb1
Shopify Partner
3 0 1

Having similar issue on multiple themes! shopify theme dev works with no errors, but nothing will update locally.

mcb1
Shopify Partner
3 0 1

Upgraded shopify-cli from 3.56.2 to 3.56.3 and its now working for me!

alejodieguez1
Shopify Partner
1 0 0

Had this issue a few days ago, around the date you were having it, solved it by restoring my browser data, cleaning up cache and cookies. Hope this helps you!

rhysnhall
Shopify Partner
3 0 5

An update to the CLI fixed this for me.

 

I once had this issue in the past, and it took Shopify's "support" (I can hardly call them that) several days to resolve it. So started freaking out when this happened again. The more and more stores I work on, the more disenchanted I become with Shopify.

 

Docs here to upgrade your CLI version.

mortendk666
Shopify Partner
1 0 0

yup still a problem here - ;(
to make it even more "fun" my firefox sometimes reacts to the changes - but chrome and safari wont, but i can load each page by adding in ?preview_theme_id=1234567878 to the url or do preview via https://[storename]myshopify.com/?preview_theme_id=[themeid] its to say it mildly a "less than optimal" way to work