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

Error when upgrading from 4.5.3 to 5.1.3 #35177

Closed
3 tasks done
Joossensei opened this issue Oct 12, 2021 · 3 comments
Closed
3 tasks done

Error when upgrading from 4.5.3 to 5.1.3 #35177

Joossensei opened this issue Oct 12, 2021 · 3 comments

Comments

@Joossensei
Copy link

Joossensei commented Oct 12, 2021

Prerequisites

Describe the issue

I was upgrading the Bootstrap dependency for the open-source CMS I am working on and when I ran npm install bootstrap@latest this installed everything like it should.
But when I tried to run npm run build I got an error saying SassError: $color: var(--background) is not a color.
I looked into it and it seems this is something that breaks in node_modules/bootstrap/scss/_functions.scss.

Compiler error:
Screenshot 2021-10-12 at 13 48 21

_functions.scss:
Screenshot 2021-10-12 at 13 48 50

_variables.scss:
Screenshot 2021-10-12 at 13 49 22

Reduced test cases

To test this you need to git clone the open-source CMS https://github.com/bolt/core and checkout to the bootstrap-upgrade-5.0 branch. Then run npm install && npm run build. Then see the errors

What operating system(s) are you seeing the problem on?

macOS

What browser(s) are you seeing the problem on?

Chrome

What version of Bootstrap are you using?

v4.5.3 -> v5.1.3

@mdo
Copy link
Member

mdo commented Oct 13, 2021

Perhaps the same issue as #34693?

@mdo mdo closed this as completed Oct 13, 2021
@Joossensei
Copy link
Author

Does this mean it is a compiler issue? If so how can I work around it then without having to edit any of the functions?

@kaushikshukla
Copy link

do we have solution for this problem, because i have also faced similar problem while upgrading bootstrap from 4.5.3 to 5.2.3.
When the error comes as variables as undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants