question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gulp.watch not working in Gulp 4.0.0

See original GitHub issue

What were you expecting to happen?

I have this simple gulp file

gulp.task('watch', () => {
  gulp.watch('path/to/file.scss')
    .on('change', gulp.series('sass'));
})

I run gulp watch then save file.scss and It should run the 'sass' task.

What actually happened?

I save file.scss and nothing happens

What version of gulp are you using?

Gulp 4.0.0

What versions of npm and node are you using? npm: 5.5.1 node: 6.12.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
doowbcommented, Jan 10, 2018

Same as #2093. You shouldn’t use the path methods on glob patterns.

0reactions
rohaanuvcommented, Aug 12, 2020

Still, my side gulp watch is not running it shows command not found

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gulp.watch tasks not called (gulp 4.0.0) - Stack Overflow
I have just migrated an old project from gulp 3 to gulp 4.0.0. I'm having trouble making gulp.watch tasks run within my watch...
Read more >
watch() - gulp.js
name type default ignoreInitial boolean true delay number 200 queue boolean true
Read more >
Gulp watch not working as expected - Laracasts
Gulp watch not working as expected. Hello,. I'm having some trouble with Gulp not watching/compiling my files correctly. See the following code: gulpfile.js....
Read more >
Gulp 4: A Sample Project - Shark Coder
Here is a simple guide on installing and configuring Gulp 4 for those who design a ... If they are not installed, run...
Read more >
Setting up gulp 4 for automatic Sass compilation and CSS ...
We should install gulp-cli globally and gulp itself as a development dependency. This way you can call the gulp command anywhere (thanks to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found