write after end
See original GitHub issueI did a recent update to libsass and this is the error that I keep getting: [gulp-sass] write after end
After some reading around, it seems to be a common error in some other packages. My css is still being built just fine.
Here is a bit more detailed error:
[13:21:07] Starting 'sass'...
events.js:72
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:144:12)
at DestroyableTransform.Writable.write (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:192:5)
at write (/Dev-Projects/Forty-Eta/node_modules/gulp-css-globbing/node_modules/vinyl-map/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at flow (/Dev-Projects/Forty-Eta/node_modules/gulp-css-globbing/node_modules/vinyl-map/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
at DestroyableTransform.<anonymous> (/Dev-Projects/Forty-Eta/node_modules/gulp-css-globbing/node_modules/vinyl-map/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:613:7)
at DestroyableTransform.EventEmitter.emit (events.js:92:17)
at onwriteDrain (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:300:12)
at afterWrite (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:288:5)
at onwrite (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:281:7)
at WritableState.onwrite (/Dev-Projects/Forty-Eta/node_modules/gulp-sass/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:106:5)
Here is my task:
var gulp = require('gulp'),
sass = require('gulp-sass'),
sourcemaps = require('gulp-sourcemaps'),
gulpFilter = require('gulp-filter'),
handleErrors = require('../util/handleErrors'),
config = require('../config'),
autoprefixer = require('gulp-autoprefixer'),
livereload = require('gulp-livereload'),
globbing = require('gulp-css-globbing');
gulp.task('sass', function () {
return gulp.src(config.sass.src)
.pipe(sourcemaps.init())
.pipe(globbing(config.sass.globbing))
.pipe(sass(config.sass.settings))
.on('error', sass.logError)
.pipe(sourcemaps.write())
.pipe(autoprefixer(config.autoprefixer))
.pipe(gulp.dest(config.sass.dest))
.pipe(livereload());
return gulp.src(config.sass.src);
});
Issue Analytics
- State:
- Created 8 years ago
- Comments:12
Top Results From Across the Web
Write After End error in node.js webserver - Stack Overflow
I am struggling with my node.js hobby project due to a "write after end" Error. I have a created a node.js webserver that...
Read more >Error: write after end (Example) | Treehouse Community
Node is asynchronous, which means that functions happen at the same time. Write after end means that something is being written after the ......
Read more >Node.js Stream writable.end() Method - GeeksforGeeks
The writable.end() method is an inbuilt application programming interface of Stream module so that no more data can be written to the Writable ......
Read more >Error [ERR_STREAM_WRITE_AFTER_END]: write after end
Anytime the flow goes into res.code().end() it throws ERR_STREAM_WRITE_AFTER_END . If I use return it seems to work fine. if (! ...
Read more >Object Storage upload: [ERR_STREAM_WRITE_AFTER_END]
Hey guys! I use aws-sdk for NodeJS for Linode Object Storage but I get the following error `[ERR_STREAM_WRITE_AFTER_END]: write after end` when uploading ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top 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
It did took some time to make this and to test so here is repository: https://github.com/macmladen/globbing-test
Explanations are in the root in
README.md
file.There are four branches with different outcomes:
master
— fails, it has all of three things that breaks with Error: write after endgulp-glob
— passes if onlygulp
globbing is turned off for directoriescss-glob
— passes if we usegulp
globbing but notgulp-css-globbing
mixin-in-scss
— both globbing there but no mixins in imported partialsIf I can do anything to help, feel free to ask.
I am unable to reproduce this with v2.3.1. If the issue persists with latest gulp-sass please open an update issue.