Error: Undefined variable. $barrio_path_images

Created on 26 March 2023, over 1 year ago
Updated 9 April 2023, over 1 year ago

Problem/Motivation

After running composer update yesterday, when running gulp in my sub-theme, I get this error:

Error in plugin "sass"
Message:
    ../../contrib/bootstrap_barrio/scss/components/variables.scss
Error: Undefined variable.
  ╷
1 │ $barrio_path_images: "#{$barrio_path_images}" !default;
  │                         ^^^^^^^^^^^^^^^^^^^
  ╵
  ../../contrib/bootstrap_barrio/scss/components/variables.scss 1:25  @import
  ../../contrib/bootstrap_barrio/scss/barrio.scss 1:9                 @import
  scss/style.scss 61:9                                                root stylesheet

I thought it was this: https://www.drupal.org/project/bootstrap_barrio/issues/3346512 🐛 File icon paths are broken Fixed but installing the latest dev version today (3/26/23) did not help.

Steps to reproduce

Create a sub-theme and try to run gulp. I think. Haven't actually tried to reproduce on a clean slate... Hence the support request and not a bug...

I'm on Drupal 9.5.7, php 8.1.

Any ideas what I can do to fix this?

💬 Support request
Status

Active

Version

5.5

Component

Code

Created by

🇺🇸United States jerrac

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jerrac
  • 🇺🇸United States jerrac

    Adding

    $barrio_path_images: "../images";

    To my import scss file seems to have fixed it for me.

    So, fixed? Or is anyone else running into this?

  • 🇺🇸United States josephcheek Provo, UT

    I'm getting this also. I'm using bootstrap_sass 5.0.9 and my subtheme is referencing this undefined variable. Adding $barrio_path_images: "../images"; does appear to fix it for me.

    BTW this is on a clean slate, so I do believe this is a bug, but I'm not sure whether this is a bug in bootstrap_barrio or in bootstrap_sass.

  • 🇬🇧United Kingdom newaytech

    same here folks. I added the following to my subthemes variables.scss

    // New image variable introduced on 5.5.1
    $barrio_path_images: "../images/";

    but as others have said - would have expected this to be in the newly introduced variables scss file - for sub themes to then override if required?

  • 🇦🇺Australia noonoos

    Same here. After composer upgrade to Drupal 10 with bootstrap upgrade. #2 solved

  • First commit to issue fork.
  • @sandeshyadav opened merge request.
  • 🇵🇭Philippines rusylnarito

    +1
    $barrio_path_images: "../images/" !default;

Production build 0.71.5 2024