bootstrap: Error: $color: "var(--bs-primary-rgb)" is not a color for `rgba' in v5.1.0
I try to compile in latest v5.1.0 So, I get error as below. have i wrong anything?
Error: $color: “var(–bs-primary-rgb)” is not a color for `rgba’ on line 41 of C:/xampp/htdocs/myproject/sass/bootstrap/_functions.scss from line 2 of C:\xampp\htdocs\myproject\sass\stylesheet.scss
My stylesheet.scss
@import "bootstrap/functions";
@import "bootstrap/variables";
@import "bootstrap/mixins";
@import "bootstrap/vendor/rfs";
// Initialize
@import "variables";
@import "mixins";
// Core CSS
@import "reset";
@import "helpers";
@import "layouts";
// Content Blocks
@import "elements";
@import "social-icons";
@import "extras";
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 46 (6 by maintainers)
Am I losing my mind or did they rename variables in a dot release?
I had to do a diff with my scss/_variables.scss and node_modules/bootstrap/scss/_variables.scss and fix all the changes using a external diff tool.
Like:
For all those using Visual Studio 2019 and Mad Kristensen’s “Web Compiler” extension: yes, this extension is five years old. I uninstalled this extension and instead installed another extension called “Sass Compiler”, which is from Mad Kristensen as well. Using this new extension, the errors with BS v5.1.0 went away.
For those using Web Compiler extension. The default node-sass v4.9.3 not able to compile BS v5.1.0 anymore. Please manually download latest node-sass (at least v5.0) using npm, then replace node-sass folder in C:\Users<your id>\AppData\Local\Temp\WebCompiler1.12.394\node_modules. You also need to upgrade/replace existing Web Compiler’s node.exe (located outside of node_modules folder), you can find the file after install node.js x64 for windows. Must use x64 executable file.
@maheshbokkisam I get the exact same error after updating to angular 14