node.js - Gulp task fails to write files sporadically -


i following error, not always. , not file, other file, or generated .map file.

[20:39:24] error: unknown: unknown error, open     'c:\projects\somewebsite\buildartifacts\styles\framework\customer-signup.css' 

the gulp task looks this:

function styles(cb) {     var stream = require('merge-stream')();      var stylebundles = bundleconfig.filter(function (bundle) {         return bundle.type === 'stylesheets';     });      stylebundles.foreach((bundle) => {         let starttime = process.hrtime();          gutil.log('starting', gutil.colors.green(bundle.name), 'with', gutil.colors.blue(bundle.files.length), 'files');          let stylestream = gulp.src(bundle.files, { root: './website', base: './website' })             .pipe(sourcemaps.init())             .pipe(less({ compress: false }).on('error', errorhandler))             .pipe(postcss([                 autoprefixer({                     browsers: config.autoprefixer                 })             ]))             .pipe(sourcemaps.write('.'))             .pipe(gulp.dest('./website/buildartifacts/'))             .on('error', function(err) {                 gutil.log(gutil.colors.red(err));                 this.emit('end');             })             .on('end', function() {                 var duration = process.hrtime(starttime);                 gutil.log('finished', gutil.colors.green(bundle.name), 'after', gutil.colors.magenta(prettytime(duration)));             });          stream.add(stylestream);     });      return stream.isempty() ? cb() : stream; } 

i'm thinking it's problem, disk can't write file want output. don't have go on, , happens sometimes.

i tried on windows 7, node v6.4.0. seems i'm not 1 problem, other people on same team same error. it's gulp 4 script, , it's write lot of files, think 1000 css files , 1000 .map files.

it's never file exist, files try write disk.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -