-
Notifications
You must be signed in to change notification settings - Fork 462
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
Issues when importing a file that imports other files not relative to the first file #1750
Comments
So… your Sass file has something like this: // Assuming this file is in project-root/sass.
@import "../bower_components/bootstrap-sass/assets/stylesheets/bootstrap"; ? |
Yep. That's not the exact code, but it's close enough to get the idea. |
I'm unable to reproduce this locally.
Ruby Sass
LibSass 3.3.2
|
I think I narrowed down the issue to when the include path is something like this:
In the
With node-sass 3.4.1 it works just fine. With node-sass 3.4.2 I get the following error:
|
Have you guys been able to reproduce the issue now? |
I've been having the same issue where sass files that try to import relative paths no longer work .... I'm using gulp-sass and have had to lock down the old version (2.0.3) to keep things working. We use gulp-sass -> node-sass -> libsass ... and after 2.0.3 of gulp-sass trying to include sass imports (from our bower dir) fail to find any imports that try to use relative paths. Something as simple as Foundation or Ionic sass files (with @import "panel") will fail to resolve... the file is local (in nested bower scss folder) to the current file. Would love to hear some other thoughts/ideas on how to solve... I can't find any other people talking about this. Using Windows environment. Thanks! |
Can't provide a true sample, but here's the gist: gulpSass.sass({ Foundation scss file (in this case /foundation-apps/scss/components/_grid.scss) has "@import "panel"". _panel.scss is available in the same path as _grid.scss. However, with newer versions of libsass this results in "File to import not found". This worked properly in earlier version of gulp-sass -> node-sass -> libsass |
Should be fixed in master, see #1846 |
I use grunt-sass 1.1.0 that uses node-sass 3.4.2 that uses libsass 3.3.2. Since updating node-sass from 3.4.1 to 3.4.2 (which bumped the libsass version) our builds don't work and I've tracked the problem down to libsass 3.3.2, but my C++ is so rusty that I'm not sure how to fix the issue and submit a pull request.
The scenario: our stylesheet (style.scss) imports bootstrap-sass's _bootstrap.scss. This in turn imports its own files, relative to itself. Those relative files are not found unless I add Bootstrap's directories to the include-path array. I think libsass is looking relative to the initial file, but not relative to the imported files. Font Awesome has the same issue.
I would really rather not include vendor paths in our include-path array, especially since it wasn't required before. Perhaps it's something that was introduced with 610acbf? (e78b314 references that commit as having another relative related issue) Again, my C++ is practically non-existent at this point.
The text was updated successfully, but these errors were encountered: