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

loadPath doesn't find node_modules package #236

Open
chenasraf opened this issue Aug 20, 2017 · 1 comment
Open

loadPath doesn't find node_modules package #236

chenasraf opened this issue Aug 20, 2017 · 1 comment

Comments

@chenasraf
Copy link

chenasraf commented Aug 20, 2017

I'm not sure what I'm doing wrong - I have a .scss file like this:

//// Start Bootstrap
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";

// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
@import "bootstrap/glyphicons";

// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid";

// Utility classes
@import "bootstrap/utilities";
@import "bootstrap/responsive-utilities";
@import "bootstrap/tooltip";
//// End Bootstrap

And then my Gruntfile looks like this:

sass: {
      dist: {
        options: {
          style: 'expanded',
          loadPaths: ['node_modules/bootstrap-sass/assets/stylesheets/'],
          require: 'bootstrap-sass' // tried with/without
        },
        files: {
          'dist/css/app.css': 'src/sass/app/app.scss',
        }
      }
    }

But when attempting to compile I get the following error:

>> Error: File to import not found or unreadable: bootstrap/variables.
>>        Parent style sheet: <path>/src/sass/<file>.scss
>>         on line 3 of src/sass/<file>.scss
>> >> @import "bootstrap/variables";
>>    ^
Warning:  Use --force to continue.

Aborted due to warnings.

What am I doing wrong? I checked the path and it is indeed valid, so I'm not sure why this would happen. I also tried adding file extensions and underscores to the import but it didn't work.

@chenasraf chenasraf changed the title loadPath doesn't find bootstrap loadPath doesn't find node_modules package Aug 20, 2017
@andrejpavlovic
Copy link

The correct option name seems to be "includePaths", not "loadPath".

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

2 participants