0
votes

I'm using laravel 5.2 with elixir. I have an error when I use bootstrap-material-design with bootstrap-sass, the gulp task return this :

gulp-notify: [Laravel Elixir] Sass Compilation Failed: node_modules/bootstrap-material-design/sass/_import-bs-sass.scss
Error: File to import not found or unreadable: bootstrap/variables
       Parent style sheet: /workspace/node_modules/bootstrap-material-design/sass/_import-bs-sass.scss
       on line 1 of node_modules/bootstrap-material-design/sass/_import-bs-sass.scss
>> @import "bootstrap/variables";

When I replace the line with this, it works.

@import "../../bootstrap-material-design/sass/variables";

In my gulpfile I've got :

elixir(function(mix) {
mix
    .browserSync({
        proxy : 'http'
    })
    .sass('app.scss')
    .browserify('app.js')
    .version(["public/css/app.css","public/js/app.js"]);
});

In my app.scss I've got :

@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
@import "node_modules/bootstrap-material-design/sass/bootstrap-material-design";

What am I doing wrong ?

1

1 Answers

0
votes

I've found the solution, here is my gulpfile.js

elixir(function(mix) {
    mix
        .browserSync({
            proxy : 'http'
        })
        .sass('app.scss', "public/css/app.css", {
            includePaths: ['node_modules/bootstrap-sass/assets/stylesheets/']
        })
        .browserify('app.js')
        .version(["public/css/app.css","public/js/app.js"]);
});