gulp-sass doesn't seem to play nice with sass imports
See original GitHub issueRight now if any of my sass files have an @import
in them I get an error like this:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
source string:1: error: file to import not found or unreadable: 'normalize'
Where normalize is a normalize.scss
in the same directory.
This seems to be because you are using the data option without an includePaths.
This could maybe be solved with an includePaths option?
gulp.src('./styles/main.scss')
.pipe(sass({includePaths: ['./styles']}))
.pipe(gulp.dest('./styles'))
Issue Analytics
- State:
- Created 10 years ago
- Reactions:25
- Comments:89 (8 by maintainers)
Top Results From Across the Web
gulp-sass seems not resolving imports - Stack Overflow
So it seems to me that the sass task are not handling the import (even with the includePaths options). While if I do...
Read more >Sass: @use
Sass makes it easy to define a private member by starting its name with either - or _ . These members will work...
Read more >Stop using @import with Sass | @use and @forward explained
A quick note, if you are using node- sass, it is out of date and @use and @forward, as well as their entire...
Read more >sass-loader - webpack - JS.ORG
This allows you to control the versions of all your dependencies, and to choose which Sass implementation to use. Note. We highly recommend...
Read more >Fixing gulp-sass issues in gulp 4. - DEV Community
Update your gulp task as necessary. Set your sass compiler to sass (Dart-sass). "sass.compiler = require('sass');". Here is my ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My problem was caused by a combination of Sublime Text and a slow hard drive. We were able to solved it by changing the setting atomic_save to true.
Preferences > Settings - User > "atomic_save": true
@Shaker-Hamdi Great idea! Basicly the right cause.
So we can slow down the complie speed and code gulpfile like this:
It works fine for me! Hope it could be helpful.