theme-check icon indicating copy to clipboard operation
theme-check copied to clipboard

Variables from other files are not recognized

Open AldiNFitrah opened this issue 2 years ago • 0 comments

Hi, I'm new to shopify app development. I want to validate a theme but I got so many errors stating that my variables are undefined.

Bug Description

I declared some variables in file A. Then, in file B, I render file A, and use those variables afterwards. But in theme check, it says that the variables are undefined.

Expected

Theme check should recognize those variables and does not mark them as offenses.

Actual

The variables are undefined according to theme check.

Screenshot

image

Debugging information

  • OS [e.g. Windows, Mac, Linux]: Linux
  • Version (output of theme-check --version in a terminal): 1.15.0

Additional context

I am not sure if I installed the tools correctly, but here's what I ran:

sudo apt install ruby-full
yarn global add @shopify/cli @shopify/theme
gem install bundler
shopify theme check

AldiNFitrah avatar Jul 28 '23 04:07 AldiNFitrah