Answer the question
In order to leave comments, you need to log in
What's wrong with gulp browser-sync plugin?
I use gulp for assembly, I connected the browser-sync plugin for the local server.
At the start of the gulp, it gives the following error . The tunnel server offline: connect ETIMEDOUT, retry 1s
page does not open automatically. The same issue if you run the server task separately.
At the same time, the rest of the tasks work.
If you make changes in any file and save, gulp crashes and gives the following:
D:\projects\gulp_front\node_modules\browser-sync\lib\browser-sync.js:619
bs.io.sockets.emit("file:reload", item);
^
TypeError: Cannot read property 'sockets' of undefined
at D:\projects\gulp_front\node_modules\browser-sync\lib\browser-sync.js:619:22
at Array.forEach (native)
at null._onTimeout (D:\projects\gulp_front\node_modules\browser-sync\lib\browser-sync.js:618:29)
at Timer.listOnTimeout (timers.js:110:15)
var config = {
server: {
baseDir: "./build"
},
tunnel: true,
host: 'localhost',
port: 8000,
logPrefix: "gulp_frontend"
};
// Поднимаем вебсервер
gulp.task('webserver', function () {
browserSync(config);
});
.pipe(reload({stream: true}));
Answer the question
In order to leave comments, you need to log in
Maybe your port is clogged with something (stupid version, but at least some)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question