var gulp = require('gulp');
var mjml = require('gulp-mjml');
gulp.task('build', function () {
gulp.src(['./src/**/*.mjml'])
.pipe(mjml())
.pipe(gulp.dest('./build'));
});
gulp.task('default', function () {
gulp.watch('./src/**/*.mjml', ['build']);
});
Full error console output :
[15:42:02] Starting 'default'...
[15:42:02] Finished 'default' after 13 ms
[15:42:10] Starting 'build'...
[15:42:10] Finished 'build' after 17 ms
buffer.js:284
throw new TypeError(kFromErrorMsg);
^
TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
at fromObject (buffer.js:284:9)
at Function.Buffer.from (buffer.js:116:10)
at new Buffer (buffer.js:95:17)
at DestroyableTransform._transform (node_modules\gulp-mjml\src\index.js:23:22)
at DestroyableTransform.Transform._read (node_modules\readable-stream\lib\_stream_transform.js:159:10)
at DestroyableTransform.Transform._write (node_modules\readable-stream\lib\_stream_transform.js:147:83)
at doWrite (node_modules\readable-stream\lib\_stream_writable.js:347:64)
at writeOrBuffer (node_modules\readable-stream\lib\_stream_writable.js:336:5)
at DestroyableTransform.Writable.write (node_modules\readable-stream\lib\_stream_writable.js:274:11)
at write (node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:623:24)
Steps to reproduce :
gulpfile.js
: see belowgulp
Full error console output :