tabler icon indicating copy to clipboard operation
tabler copied to clipboard

Build failing due to sass include path

Open krsyoung opened this issue 8 years ago • 4 comments

I have just freshly cloned the project, installed npm packages and ruby gems. When I run npm run dist (or anything to do with the SASS) I get the following error:

$ npm run dist

> gulp build && JEKYLL_ENV=production jekyll build --destination dist

[16:16:11] Using gulpfile tabler/gulpfile.js
[16:16:11] Starting 'styles'...
[16:16:11] Starting 'styles-plugins'...
Error in plugin "sass"
Message:
    src/assets/scss/bundle.scss
Error: File to import not found or unreadable: ~bootstrap/scss/bootstrap.scss.
        on line 6 of src/assets/scss/bundle.scss
>> @import '~bootstrap/scss/bootstrap.scss';

If I replace ~bootstrap/scss/bootstrap.scss with node_modules/bootstrap/scss/bootstrap.scss everything works as expected.

I tried to update gulpfile.js with an includePath for the SASS pipeline but no dice. Is this working for others?

        .pipe(sass({
            precision: 8,
            outputStyle: 'expanded',
            includePaths: ['./node_modules/'] . // added to try and resolve ~
        }).on('error', sass.logError))

krsyoung avatar Nov 10 '18 21:11 krsyoung

modify file:

src/assets/scss ➜ scss git:(dev) ✗ cat bundle.scss /** Dashboard UI */

@import 'variables'; @import 'bootstrap/scss/bootstrap.scss'; @import 'dashboard/dashboard';

then

ln -s ../../../node_modules/bootstrap

bigxu avatar Nov 13 '18 09:11 bigxu

Thanks @bigxu, will conclude their is something wrong with my environment and thus the workaround needed.

If this were broader I'd expect more people to be facing the issue based on a fresh clone.

krsyoung avatar Nov 14 '18 19:11 krsyoung

I have the same problem on a clean "git clone". Many people may be affected by this

paulftw avatar Feb 03 '19 14:02 paulftw

modify file:

src/assets/scss ➜ scss git:(dev) ✗ cat bundle.scss /** Dashboard UI */

@import 'variables'; @import 'bootstrap/scss/bootstrap.scss'; @import 'dashboard/dashboard';

then

ln -s ../../../node_modules/bootstrap

It must be an environment issue.

I just accepted it and updated to @import node_modules/bootstrap/scss/bootstrap.scss

mwumvax avatar Feb 12 '19 12:02 mwumvax