Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: shopify theme dev is losing track of the development theme #3715

Closed
karreiro opened this issue Apr 15, 2024 · 10 comments
Closed

[Bug]: shopify theme dev is losing track of the development theme #3715

karreiro opened this issue Apr 15, 2024 · 10 comments
Assignees
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working

Comments

@karreiro
Copy link
Contributor

karreiro commented Apr 15, 2024

In which of these areas are you experiencing a problem?

Theme

Expected behavior

When users run shopify theme dev, a development theme should be created and assign as [yours] (your development theme should never be re-assigned).

Actual behavior

When users run shopify theme dev, the development theme seems to be re-assigned and in some contexts the CLI is election even non-development themes.

@karreiro karreiro added Type: Bug Something isn't working Area: @shopify/theme @shopify/theme package issues labels Apr 15, 2024
@JamiesonRoberts
Copy link

This has been a huge pain all day today. Not sure what's going on, but its made it basically impossible to reliably build things with the session re-assignment happening

@andre-ani
Copy link

andre-ani commented Apr 15, 2024

Getting the same issue, started a few days ago. This problem has come up in the past and was resolved with an update. It's really frustrating. When running shopify theme dev my dev code is being run with the primary published theme, instead of the development theme.

The only way I can keep working is to do so within the theme editor.

@DreamyTalesPAN
Copy link

Still having the same issue since a couple of days. Tried to delete the development theme with shopify theme --delete and re-run shopify theme dev in an incognito tab but no success so far.

@sameerxanand
Copy link

Here's how I'm working around it:

shopify theme list

Find your development theme in the list

shopify theme delete -t {ID of your development theme}

Run shopify theme dev and it should use a new development theme instead of the live theme.


Agree this whole issue has been a pain in the a**. Shopify pushed a new CLI update today which now shows a new warning:

Warning: Could not find ts-node at /opt/homebrew/Cellar/shopify-cli/3.59.0/libexec/lib/node_modules/@shopify/cli/dist/index-e6f8190d.js. Please ensure that ts-node is a devDependency. Falling back to compiled source.

@davidhollenbeckx
Copy link

@karreiro emailed you a few examples of this - came here to find you've already flagged it!

appreciate all your help here

@mgmanzella
Copy link
Contributor

another example: #3794

@karreiro
Copy link
Contributor Author

Thank you for sharing that context in the email, @davidhollenbeckx! That not only helps the team understand the issue itself, but it also helps us understand how developers use CLI in their workflows.

For anyone experiencing this problem, you can adopt the following steps as a temporary workaround:

  • Run shopify theme push -u -t <name_of_your_dev_theme> to create a new theme
  • Run shopify theme dev -t <name_of_your_dev_theme> to force the CLI to use that specific theme in the development server

As soon as we get this fixed, we will update this issue.

Thanks everyone for reporting this problem.

@karreiro
Copy link
Contributor Author

Thank you, everyone, for reporting this problem and providing details.

This issue has been fixed by #3809, so upgrading to the latest release (3.59.2) fixes this problem.

@nboliver-ventureweb
Copy link

@karreiro Using v3.59.2, I am continuing to see theme mismatch problems. Not sure if this is the same issue or something new. The correct dev theme is usually loaded when first running shopify theme dev; however, when refreshing the page, it then swaps between the live theme and the dev theme on each subsequent reload.
The full command being used is: shopify theme dev --live-reload full-page.
I can provide a video or more details via DM, if that's helpful.

@nboliver-ventureweb
Copy link

@karreiro This is definitely not fixed. See here: https://shopifypartners.slack.com/archives/CKQTKDZV2/p1714579081291059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/theme @shopify/theme package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants