Search code examples
gulpgulp-sassgulp-watch

Gulp doesn't detect change


I have a problem with my Gulp installation. On running SASS, it detects change, run gulp-sass, but dosen't push any change, and says the following:

[17:48:30] Starting 'sass'...
[BS] 0 file changed ()
[17:48:30] Finished 'sass' after 12 ms

As you can see, there are 0 file changed, but files have been changed in my editor. I also try to close the process, and run again, not working.

I am using jekyll-gulp-sass-browser-sync stack. All was working.

You can see all the files here.

Thanks!


Solution

  • There are 2 common reason why sass auto-watch doesn't work:

    1. You add a new sass file while watching
    2. Your sass files are in the folder which is not set in gulp config
    3. You are not at the tab where browserSync is currently serving

    Since you said you've re-run the gulp process, we can cross out the first cause. And if you can see the terminal show 0 file changed AFTER you change a file, we can then cross out the third cause. So chances are you just did not put the sass files in the right place.

    You may first check whether your sass files are in the folder which is set in your gulpfile. An easy check is to clone the project and run it locally as the example shows, if it does work, then it must be the path issue.