Доброго времени суток.
BrowserSync не хочет запускаться.
выдаёт вот такое сообщение
ReferenceError: wach is not defined
at Object. (C:\Users\kolpa\Desktop\FrontEnd\Projects\Gulp\gulpfile.js:45:19)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at requireOrImport (C:\Users\kolpa\AppData\Roaming\npm\node_modules\gulp-cli\lib\shared\require-or-import.js:19:11)
at execute (C:\Users\kolpa\AppData\Roaming\npm\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js:37:3)
at Liftoff.handleArguments (C:\Users\kolpa\AppData\Roaming\npm\node_modules\gulp-cli\index.js:211:24)
вот код gulpfile.js
let project_folder = "dist";
let source_folder = "#src";
let path = {
build: {
html: project_folder + "/",
css: project_folder + "/css",
js: project_folder + "/js",
img: project_folder + "/img",
fonts: project_folder + "/fonts"
},
src: {
html: source_folder + "/",
css: source_folder + "/scss/style.scss",
js: source_folder + "/js/script.js",
img: source_folder + "/img/**/*.{jpg,png,svg,gif,ico,webp}",
fonts: source_folder + "/fonts/*.ttf"
},
watch: {
html: source_folder + "/**/*.html",
css: source_folder + "/scss/**/*.scss",
js: source_folder + "/js/**/*.js",
img: source_folder + "/img/**/*.{jpg,png,svg,gif,ico,webp}"
},
clean: "./" + project_folder + "/"
}
let { src, dest } = require('gulp'),
gulp = require('gulp'),
browsersync = require("browser-sync").create();
function browserSync(params) {
browsersync.init({
server: {
baseDir: "./" + project_folder + "/"
},
port: 3000,
notify: false
})
}
let watch = gulp.parallel(browserSync);
exports.watch = watch;
exports.default = wach;
Что не так не могу понять.