Theme app extension preview is never updated

Hello. I’ve just started Shopify Theme App Extensions development.
According to the great tutorial, the example app blocks (“Star Rating”) worked in my development store!

The steps are:

  • Run npm run shopify app generate extension
  • Run npm run dev
  • Install the app into my development store via “Preview URL” in the CLI output
  • Turn on “Development store preview” after opening the “Partner Dashboard” page via the URL in the CLI output
  • Open the theme editor page via the URL in the CLI output
  • Successfully the app blocks appeared in the editor :tada:

But I cannot update this extension. The shopify app dev process watches code changes and pushes theme files automatically. However, the app blocks in the theme editor never changed.

For example:

I appreciate any help, thank you.

2 Likes

I have same issue with you. I’m not sure about the code but if we generate a new app & new theme extension, it still working normally.

1 Like

@morishin I resolved this issue at my side by running: npm run deploy, then I run dev again. it’s working well now

@mason225

Wow! Your method worked for me too. Thank you so much!

Moreover, after deploying once, the changes now reflect in the theme editor without having to deploy every time I modify a file.

But I think this is a bug in the Shopify CLI. :thinking:

you are exactly, I also have to run deploy again the make the code change in terminal

I have the same issue as other posters, and running deploy will push up my current extension code, but running dev still won’t update after that. This is an incredibly frustrating bug, as I am effectively unable to work on extensions.

1 Like

This is also happening to me. It worked few days back, however. I tried to upgrade shopify-cli to latest version (3.55.2), but the issue still persist. I have however somewhat different project folder structure (I added src folder inside extension folder and webpack configuration).

i am also facing the issue. i am using shopify CLI laravel template for my app. In that i have used the shopify extenion app too.

this appear into theme only if i run npm run depoly it again vanished in the theme if run npm run dev.

I am using shopify CLI latest (at this moment)
@Shopify_77 /cli/3.55.4 win32-x64 node-v20.11.0

This has been an ongoing headache for us with theme extensions. The problem got really bad after Shopify updated how app config changed with deployments.

Basically our issue has been that one of our developers created a WIP theme extension, and did a deployment. Another developer on a working branch needed to update scopes, and did a deployment, which deleted the WIP theme extension.

Now when we try to do development on theme extensions, our CLI displays a URL for non-existent theme extension, and our real extensions never get updated. We have to run full deployments to see any changes in our theme extension.

1 Like