Closed peepers-rick closed 1 year ago
Hi! Sorry for the late response.
I'm not able to reproduce it, but we are investigating what could be happening.
Could you please share a screenshot with the errors?
Hi @gonzaloriestra ,
No problem. I've attached a screenshot. This is a template located at theme/templates/page.info.liquid
. The MissingTemplate
error is appearing on {% section 'info-hero' %}
which definitely exists at theme/sections/info-hero.liquid
. This happens for all section and snippet files. I'm running shopify theme serve theme
(the 2nd theme
to indicate the root of the theme is the theme
folder. The error indicates 'sections/info-hero.liquid' is not found theme-check (MissingTemplate)
which indicates to me it's probably looking at the default root, not the theme
root I specified via shopify theme serve theme
.
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.
I'm still having this issue with the latest version of shopify-cli (currently 2.20.1)
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.
I'm still having this issue with the latest version of shopify-cli (currently 2.29)
cc @Shopify/theme-developer-tools
I was able to reproduce the issue.
It's important to mention here that shopify theme check src
does not return any MissingTemplate
error (when a root is defined), but that the Shopify Liquid VS Code extension does not (can't?) take into account any root
.
I will come back with more info soon, thanks for creating this issue!
@peepers-rick – Is your issue related/the same as https://github.com/Shopify/theme-check-vscode/issues/79 ? If yes, can you…
root: src
to your .theme-check.yml
… to see whether the error disappears?
@Poitrin that fixed it! Thanks! Sorry I didn't even realize I had theme check installed to be honest with you, I thought it was all through shopify-cli
@peepers-rick – Awesome, thanks for the quick reply! I will close the issue then. And yes, I agree, It's indeed a little confusing that "Theme Check" stands for multiple projects/tools, but my team is already aware of this :)
Hi,
I'm trying to migrate from PHPStorm to VS Code, but I am facing the same issue and I can't solve it.
I have created a workspace in VS Code where one folder = one theme.
Each theme has its own .theme-check.yml, and properly reference the dist
folder in the root option:
Despite being properly set up, it constantly raise missing templates for all includes (there are, of course, in the folder):
How can I make this work?
Please confirm that you have:
What type of project are you working on?
theme
Expected behavior
Using
shopify theme serve [ ROOT ]
where the root is not the default directory structure should NOT result intheme-check(MissingTemplate)
for all snippets and sections.``Actual behavior
Using
shopify theme serve [ ROOT ]
where the root is not the default directory structure shows errors for valid sections and snippetsStack trace
No response
Reproduction steps
src
foldershopify theme serve src
{% render %}
{% include %}
{% section %}
tags result in atheme-check(MissingTemplate)
. If you try to click through, it ignores the root (in this casesrc
) and looks directly at the default root directory.Operating System
Windows 10
CLI version (run
shopify version
if you're not sure)2.15.3
Shell
zsh
Ruby version (run
ruby -v
if you're not sure)3.0.1p64
What language and version are you using in your application?
Liquid