A
A
afishr2016-04-23 15:34:42
gulp.js
afishr, 2016-04-23 15:34:42

Errors to Gulp console?

Used OpenServer to set up a server for PHP. I use this server as a proxy for browser-sync from Gulp in order to use auto-reload goodies, etc. As usual, everything worked fine before, but now there are errors.
I can't figure out the reason for the errors. Gulp and Browser-Sync reinstalled.
gulpfile.js:

"use strict";

var gulp = require('gulp'),
    browserSync  = require('browser-sync').create(),
    path = 
    {
      watch:
      {
        all: '*/*'
      }
    },
    config = 
    {
      proxy: "http://php/build/",
      open: false,
      notify: false,
      tunnel: false,
      logPrefix: "WEB"
    };

/* WebServer */
gulp.task('server', function() {
  browserSync.init(config);
});

/* Watch */
gulp.task('watch', function()
{
  gulp.watch('build/*.php', [browserSync.reload]);
});

/* Default */
gulp.task('default', ['server', 'watch']);

Errors:
1ba89efb440a4d8baba0166fde65ab3d.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
HamSter, 2016-04-23
@HamSter007

Here is a guy from github writes

My bad - the .exit() method only just landed in v1.2.0
try ...
npm install [email protected]

Didn't try?

A
afishr, 2016-04-24
@afishr

Problem solved. It was in this line
. If you call only one callback in watch, then you do not need to insert it in square brackets.
gulp.watch('build/*.php', browserSync.reload);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question