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 compiling scss #12

Closed
Geczy opened this issue Dec 12, 2017 · 19 comments
Closed

Error compiling scss #12

Geczy opened this issue Dec 12, 2017 · 19 comments

Comments

@Geczy
Copy link

Geczy commented Dec 12, 2017

@import '~bootstrap/scss/bootstrap';
@import '~shards-ui/src/scss/shards';

I receive the following error located here

https://github.com/DesignRevision/shards-ui/blob/master/src/scss/_variables.scss#L744

$popover-arrow-outer-width:           ($popover-arrow-width + 1px) !default;
                                     ^
      Incompatible units: 'px' and 'rem'.
@hisk
Copy link
Contributor

hisk commented Dec 13, 2017

The $popover-arrow-width variable uses px a few lines above in Shards.

Please make sure that you are using the beta-1 version of Bootstrap 4 or that you are not changing the value type somewhere in between.

@Geczy
Copy link
Author

Geczy commented Dec 13, 2017

But Bootstrap 4 beta 2 uses rem, and you even include beta 2 in your README

https://github.com/DesignRevision/shards-ui#-quick-start

@hisk
Copy link
Contributor

hisk commented Dec 13, 2017

Oh, haven't noticed that, thanks for pointing it out. Please let me know if using beta-1 fixes your issue.

@Geczy
Copy link
Author

Geczy commented Dec 13, 2017

It does fix it. Rolling back is not a fix though, do you plan to support bootstrap 4b2?

@hisk
Copy link
Contributor

hisk commented Dec 13, 2017

Adding support for beta-2 is on the list, but not a priority yet. If v4-stable doesn't ship by then, expect some movement in that direction starting early next year.

@hisk hisk closed this as completed Dec 13, 2017
@piuccio
Copy link

piuccio commented Mar 28, 2019

I'm having this same problem when loading bootstrap 4.3.1

@taj
Copy link

taj commented Apr 1, 2019

me too, can we reopen this issue please?

@hisk hisk reopened this Apr 1, 2019
@hisk
Copy link
Contributor

hisk commented Apr 1, 2019

@piuccio @tajchumber Can you please share the error you are receiving here?

@taj
Copy link

taj commented Apr 2, 2019

@hisk The issue is here

The error I get is:

Module build failed: ModuleBuildError: Module build failed:
$popover-arrow-outer-width:           $popover-arrow-width + 1px !default;
                                     ^
      Incompatible units: 'px' and 'rem'.

@piuccio
Copy link

piuccio commented Apr 5, 2019

I encountered this problem while trying to use shard-dashboard-lite inside a next.js project using sass.

If I import @import "shard-dashboard-lite/src/shards-dashboard/styles/shards-dashboards.1.1.0.min.css"; everything works fine, but when I use @import "shard-dashboard-lite/src/shards-dashboard/styles/scss/shards-dashboards.scss"; I get the error

$popover-arrow-outer-width:           $popover-arrow-width + 1px !default;
                                     ^
      Incompatible units: 'px' and 'rem'.
      in .../node_modules/shards-ui/src/scss/_variables.scss (line 759, column 39)

I'm using

"bootstrap": "4.3.1",
"node-sass": "4.11.0",
"shards-react": "1.0.3"

@hisk
Copy link
Contributor

hisk commented Apr 5, 2019

@tajchumber @piuccio The issue is cause due to the fact that Shards does not currently support Bootstrap 4.3.x. Please check and make sure that you are using Bootstrap 4.1.x 😄

Support for the latest version is coming soon.

@taj
Copy link

taj commented Apr 8, 2019

@hisk this problem persists with Bootstrap 4.1.3 as well

@ExsyDev
Copy link

ExsyDev commented Apr 30, 2019

@hisk I have a same problem. I use bootstrap: 4.3.1. Please fix it

@aalimovs
Copy link

aalimovs commented May 9, 2019

Same errors here:

4.3.1 - Error: Incompatible units: 'px' and 'rem'.
4.1.3 - Error: Incompatible units: 'px' and 'rem'.
4.0.0-beta - Error: (en: "Choose file...") isn't a valid CSS value

@ElmirMahmudov
Copy link

i just imported bootstrap after 'shards-dashboards' it worked.

@cookieshell
Copy link
Member

There are known factors that can cause this issue depending on the environment and dependencies versions. Our team will provide a fix as soon as possible. Thank you for your patience!

@iBelit
Copy link

iBelit commented Jun 27, 2019

problem is with this line:759
$popover-arrow-outer-width: $popover-arrow-width + 1px !default;

i removed "!default" from $popover-arrow-width variable in line 755 and my problem solved!

@cookieshell cookieshell mentioned this issue Jul 30, 2019
@cookieshell
Copy link
Member

Fixed in #57

@MD-AZMAL
Copy link

MD-AZMAL commented Apr 1, 2021

Having the same issue

code

@import '~bootstrap/scss/bootstrap';
@import '~shards-ui/src/scss/shards';

Version

    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "shards-react": "^1.0.3",
    "bootstrap": "^4.6.0",
    "node-sass": "^5.0.0",

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

10 participants