Answer the question
In order to leave comments, you need to log in
BrowserSync autostart not working?
Hello everyone, there was such a thing ((Autorun BrowserSync does not work, what exactly do I mean, addresses are created, everything is fine, but when I try to start BrowserSync it gives me this error.
prntscr.com/ipv7yi but if I enter the address into the browser, then everything is ok. Maybe someone faced such a task? I am attaching the code
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync').create();
gulp .task('sass', function() {
return gulp.src('scss/main.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(' css'))
.pipe(browserSync.reload({stream: true}))
});
gulp.task('browser-sync',function() {
browserSync.init({
server: {
baseDir: '../',
index: "index.html",
directory: true
}
});
});
gulp.task('watch', ['browser-sync', 'sass'] , function() {
gulp.watch('scss/main.scss', ['sass']);
});
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