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

.shopify/metafields.json is always created when a project is opened on VSCode #724

Open
msev opened this issue Jan 20, 2025 · 1 comment
Labels
Bug Something isn't working SEV-3 Normal Severity

Comments

@msev
Copy link

msev commented Jan 20, 2025

Describe the bug
I have several Shopify projects on my Mac.
When I open any of these projects on VSCode, the file .shopify/metafields.json is created at the root of the project.
This file contains the metafield definitions of another project, not the one currently open.

In addition, the file is added to the project root, whereas I use the following structure:

project-name/

.shopify/metafields.json <- wrong file created automatically
/styles
/scripts
/theme

.shopify/metafields.json <- good file created with the shopify theme metafields pull command
.shopifyignore
/assets
/sections
/snippets
...
shopify.theme.toml

package.json
...

The file is therefore not added where it should be; it should be added in the /theme folder.

If I deactivate the Shopify Liquid extension, the problem no longer occurs: the .shopify/metafields.json file is not created automatically.

Expected behaviour
The .shopify/metafields.json file should not be created automatically.

Actual behaviour
The .shopify/metafields.json file is created automatically.

Debugging information

  • OS: macOS
  • OS Version: 14.7.2
  • Theme Check Version: 3.5.0
@charlespwd
Copy link
Contributor

Looks like we should be "surer" that we're at the root of a theme yep. Thanks for reporting!

@charlespwd charlespwd added Bug Something isn't working SEV-3 Normal Severity labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working SEV-3 Normal Severity
Projects
None yet
Development

No branches or pull requests

2 participants