-
Notifications
You must be signed in to change notification settings - Fork 381
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
not working with gulp 4.0 #383
Comments
You need to use gulp.src, here's the task I've been using with gulp 4 for months now var sassFiles = "src/style/**/*.scss"
gulp.task("sass", function() {
return gulp.src(sassFiles)
.pipe(sass({outputStyle: "compressed"}).on("error", sass.logError))
.pipe(autoprefixer())
.pipe(gulp.dest(outputFolder))
}); |
That makes absolute no difference. Just tested, btw 10x for the quick response. Task is starting and thats it. When I change sass file it start again and never finish. Gulp is version 4. Please test and if you find why tasks not finish share here. Thanks |
Plsease test and don't close issues like that 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('sass', function () {
gulp.src('src/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('dist/css'));
});
gulp.task('sass:watch', function () {
gulp.watch('src/**/*.scss', ['sass']);
});
gulp.task('build', gulp.series(
gulp.parallel(sass)
));
gulp.task('default', gulp.series('build')); |
The above works for me (minus the gulp 4 incompatibility: gulp.watch('src/*/.scss', ['sass']); ). I've tried on one of my repo (https://github.com/Keats/snowflake) and I don't get any error and everything finishes correctly. Let me know if my repo works for you and otherwise please provide a sample repo that reproduces the error |
@Keats been using this with gulp 4 and it works fine. This is an issue with his tasks. this is wrong
should be
and
should be
You need to have @Keats You can close this, this is an issue with his gulp tasks. |
I’ve being using gulp-sass since Apr 2015, and it perfectly worked with up to NodeJS 0.2.12 Once I’ve switched to NodeJS 4.2.2 – I’ve faced with very close problem. Gulp-sass task starts and then nodejs stop working. To be clear, I've made a test based on a code from this thread. It’s CoffeeScript:
and this what I see in console:
I'm working on Window7 x64. Could that be a problem? Any idea how I could get more details from nodejs why gulp-sass kills it? |
I’ve found specific reason why my nodejs 4.2.2 was crashing with my sass files. It was the fact that I was calling Susy @include container prior of calling @include layout. And now gulp-sass perfectly works for me on NodeJS 4.2.2. So, my issue is closed In general, it’s still interesting why sass code can silently crash nodejs. I believe this question is for node-sass project. |
Could you please create a sample sass file I can test with. We should fix
|
https://github.com/Zork33/libsass-bug - simple project that demonstrates the problem |
Using concatenation rather than interpolation can cause it to crash out also. Bad
Good
|
@JimBobSquarePants good news this appears to be fixed. Try the latest node-sass. |
@Zork33 I can confirm this does segfault. Unable to create a reduced test cases of yet. |
@Zork33 OK I have a minimal reproduction now. Thanks heaps for creating that repo!
I believe this a duplicate of sass/libsass#1709 |
Thanks @xzyfer . Great to hear! |
@TeodorKolev I wanted to post the actual issue (in case you hadn't resolved it).. You are actually calling gulp-sass (the npm module, which is not a gulp task) directly, instead of the sass task. Try naming you sass task something different and it will complete properly. Hope that helps anyone who made the same mistake and ends up here! |
i have the same question .start sass .and never finished |
i update my node-sass to 3.2.5 . and slove it . It waste one night time...... |
Why is this issue still open? |
Actually, the code in the README needs to be updated, as it doesn't return the stream. |
We're open to pull requests.
|
#408 should solve that |
Ah, I forgot about your PR. So this can be closed then? |
Task did not finish Starting gulpSass...
The text was updated successfully, but these errors were encountered: