[Bug]: Shopify Theme Dev - Theme X is missing required files. Run shopify theme delete -t X to delete it
Please confirm that you have:
- [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [x] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Create a new theme instance?
Actual behavior
Quite often, when I come back to a Shopify store I haven't worked on in a while I get an error on the shopify theme dev command the first time runing it.
Theme 178600706425 is missing required files. Run shopify theme delete -t 178600706425 to delete it, then try your command again.
If I run the command again it works 🤷
The only third-party factor I can think of is NVM, (Windows Node Version Manager)
Verbose output
Verbose output
Paste the output here!
Reproduction steps
- Run the CLI
theme dev commandas normal - Try it again a week later
- Huzzah, error?
Operating System
Windows 11
Shopify CLI version (shopify --version)
3.76.2
Shell
Git Bash
Node version (run node -v if you're not sure)
23.9.0
What language and version are you using in your application?
N/A
Hey @ceri-waterscreative! Thanks for reporting this.
We may need your help to investigate this one as this isn't something we've been able to replicate internally.
Typically this message indicates that the theme 178600706425 is missing some required files on Shopify's side. At this point in time, this can happen if either the 'layout/theme.liquid', or config/settings_schema.json` files are removed or invalidated.
What I'm wondering is:
- Does theme with ID
178600706425exist on that shop? You can runshopify theme listto verify - Do the previously mentioned files exist on that theme?
While verbose logs would help us in this scenario, I understand why that wouldn't be practical for you to obtain. I'll bring this to the team, but if You do run into the skin and are able to obtain some additional information that may help us fix this problem sooner :)
Hi @jamesmengo,
Thanks for the response.
So this actually triggered for me today (once again on a site I hadn't worked on in a while), using Powershell this time so it doesn't appear to be terminal specific.
The theme it tried to load (179364168063) did exist BUT all of the files were blank or had bare essentials (not matching what I have locally).
theme.liquid had this:
{{ content_for_header }} {{ content_for_layout }}
settings_data.json had:
{ "current": {} }
Does that help?
That does help! Does settings_schema exist?
I just received this bug today after upgrading to CLI v3.78.1
settings_schema.json does exist for me
@jamesmengo Apologies, kept forgetting to check the theme when i saw the error.
Settings_schema exists, simply has {} as the content.
The following files are available with minimal/default content:
- layout/theme.liquid
- layout/password.liquid
- config/settings_data.json
- config/settings_schema.json
- templates/gift_card.liquid
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's dev tooling and experience.
P.S. You can learn more about why we stale issues here.
Still relevant on CLI v3.81.2
It's actually much worse now. I used to be able to fix this locally by running shopify auth logout and then re-running the dev command, but now that doesn't even work
I tried to recreate this error on windows (since the original post is for windows) and i wasn't able to.
@selvinkuik can i get a bit of detail on this?
- Does your theme have folders outside of theme folders?
- Is your theme repo structured in anyway that isn't standard (e.g. entire theme is nested in a deep directory)
- Does this error happen on
theme devONLY when you aren't logged in, or does it happen any other time? - Have you tried running it with the flag
--theme-editor-sync? Or any other flag? - Did you try pushing the theme to the remote development theme first?
- ie. run
theme pushand select the development theme - then run
theme dev
- ie. run
- Can you send me a screenshot of your directory structure if you feel comfortable to see if there are any missing items?
Hey all! Closing this issue for now because we cannot reproduce. If you're able to provide any of the information @aswamy asked for above then please create a new issue with all of the information so that we can triage appropriately. Thanks!