I'm using the following gulpfile config:
gulp.task('watch', (cb) => {
pump([
nodemon({
script: './server.js',
ext: 'js',
ignore: [ './dist', './public' ]
}),
gulp.watch('public/js/**/*.js', [ 'build-js' ]),
gulp.watch('public/less/**/*.less', [ 'build-css' ]),
gulp.watch([ 'public/views/**/*.html', 'public/index.html' ], [ 'build-html' ])
], cb)
})
It will restart the server whenever a server file changes, or run the corresponding build task whenever a file in ./public
changes. The build tasks are just simple minify and concat tasks which work fine on their own so that's not the issue. Now whenever I run it, I get the following stacktrace:
TypeError: from.pipe is not a function
at pipe (/home/linux/IdeaProjects/project/node_modules/pump/index.js:54:15)
at Array.reduce (native)
at pump (/home/linux/IdeaProjects/project/node_modules/pump/index.js:77:18)
at Gulp.gulp.task (/home/linux/IdeaProjects/project/gulpfile.js:56:5)
at module.exports (/home/linux/IdeaProjects/project/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/linux/IdeaProjects/project/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/linux/IdeaProjects/project/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/home/linux/IdeaProjects/project/node_modules/orchestrator/index.js:134:8)
at /home/linux/IdeaProjects/project/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
gulpfile.js:56
corresponds to the pump([
line in the config I posted above.
The interesting thing is, that despite the error, my configuration works flawlessly. It executes the correct tasks when I update some files.
So what can I do to get rid of that error? Is that a bug, or am I just missing out something?
via Benni
No comments:
Post a Comment