bigcommerce / stencil-cli

BigCommerce Stencil emulator for local theme development
https://developer.bigcommerce.com/stencil-docs
BSD 4-Clause "Original" or "Old" License
102 stars 141 forks source link

error while compiling scss files - BundleValidator #1128

Open buildpath-ian opened 1 year ago

buildpath-ian commented 1 year ago

Expected behavior

Run stencil bundle and Stencil will bundle the theme including compiling scss.

Actual behavior

Run stencil bundle and Stencil throws an error:

nvm\v18.15.0\node_modules\@bigcommerce\stencil-cli\lib\ScssValidator.js:40 throw new Error( ^

Error: Undefined variable: "$theme-body-font-family". on line 25 of settings/global/typography/typography.scss from line 1 of stdin

$fontFamily-sans: $theme-body-font-family, Arial, Helvetica, s --------------------------------^ : while compiling css files from "theme\assets\scss/fonts-icons". at ScssValidator.run (C:\Users\mason\AppData\Roaming\nvm\v18.15.0\node_modules\@bigcommerce\stencil-cli\lib\ScssValidator.js:40:23) at async BundleValidator._validateCssFiles (nvm\v18.15.0\node_modules\@bigcommerce\stencil-cli\lib\bundle-validator.js:409:9)

Steps to reproduce behavior

  1. Download theme via Stencil CLI. This theme is PapaThemes Beautify theme and it works fine installed on my store.
  2. Run stencil bundle
  3. Stencil CLI throws error as described above. Please note that it the $theme-body-font-family var is already defined in /global/_global.scss so this error shouldn't be occurring.

Environment

Stencil-cli version stencil --version: 7.2.0

Node version node -v: 18.15.0

NPM version npm -v: 9.5.0

OS: Windows 11