Answer the question
In order to leave comments, you need to log in
Why is there an error when running the gulp watch command?
When running the gulp watch command, an error occurs
C:\myproject2>gulp watch
(node:4996) fs: re-evaluating native module sources is not supported. If you are
using the graceful-fs module, please update it to a more recent version.
program code
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync');
gulp.task('styles', function(){ // Create "sass" task
return gulp.src('sass/*.sass') // Get source
.pipe(sass()) // Convert Sass to CSS with gulp-sass
.pipe(gulp.dest('app/css')) // Upload result to app/css
folder .pipe(browserSync.reload({stream:
gulp.task('browser-sync', function() { // Create task browser-sync
browserSync({ // Execute browser Sync
server: { // Define server parameters
baseDir: 'app' // Server directory - app
} ,
notify: false // Disable notifications
});
});
gulp.task('watch', ['browser-sync','styles'], function() {
gulp.watch('sass/*.sass', ['styles']); // Watching sass files
/ / Watch for other file types
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question