coreui / coreui-free-bootstrap-admin-template

Free Bootstrap Admin & Dashboard Template
https://coreui.io/product/free-bootstrap-admin-template/
MIT License
11.97k stars 3.13k forks source link

Undefined variable: "$input-btn-padding-y" when compiling from node_modules #149

Closed iamohd-zz closed 7 years ago

iamohd-zz commented 7 years ago

When pulling bootstrap from node_modules, using 4.0.0-alpha.6. It generates an error when compiling the sass files.

The Undefined variable: "$input-btn-padding-y" is in core/_buttons.scss (line 90, column 31)

mrholek commented 7 years ago

I use latest version of bootstrap which is available here: https://github.com/twbs/bootstrap.

This version is newer than alpha.6 and there're a lot of changes in bootstrap scss files. That's why you have this issue.

iamohd-zz commented 7 years ago

Wouldn't it be better if relied on latest release instead of latest branch commits.

mrholek commented 7 years ago

I agree. In future releases I'm going to use latest version of bootstrap.

I did this in current version because there are a lot of changes in Bootstrap 4 beta and I want to be up to date with this changes.

iamohd-zz commented 7 years ago

Thanks for the effort.

virtualSharif commented 7 years ago

I wanted to use bootstrap dependency from node_modules instead direct scss directory. Unfortunately I'm getting the following error:

ERROR in ./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader?{"ident":"postcss"}!./~/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/scss/style.scss
Module build failed: 
  @include button-social-size($input-btn-padding-y, $input-btn-padding-x, $font-size-base, $line-height-base, $btn-border-radius);
                             ^
      Undefined variable: "$input-btn-padding-y".
      in /Users/xxx/frontend/src/scss/core/_buttons.scss (line 94, column 31)
 @ ./src/scss/style.scss 4:14-197
 @ multi ./~/font-awesome/css/font-awesome.min.css ./src/scss/style.scss

The changes I made are as follows: a. added dependency in node_modules: "bootstrap": "^4.0.0-alpha.6" b. Updated the style.scss with

@import "../../node_modules/bootstrap/scss/normalize";

// Override Boostrap variables
@import "bootstrap-variables";

// Import Bootstrap source files
@import "../../node_modules/bootstrap/scss/bootstrap";

Try to run the project again, but I am getting error: you check the error log above

oliviagardiner commented 6 years ago

I got the same error trying to make CoreUI work with Nuxt. But "bootstrap": "^4.0.0-beta.3" worked out, it compiles just fine now, thank you for the input @mrholek