IN cmd всякий раз, когда я запускаю gulp, возникает ошибка утверждения, какими будут текущие рабочие коды для запуска gulp, потому что я просмотрел старые статьи, пожалуйста, помогите мне, спасибо заранее ....
Файл JavaScript ниже: -
'use strict';
//dependencies
var gulp = require('gulp'); //INSTALLED USING NPM
var sass = require('gulp-sass');
var minifyCSS = require('gulp-clean-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var changed = require('gulp-changed');
///////
//- SCSS/CSS
/////////////
var SCSS_SRC = './src/assets/scss/**/*.scss'; //INPUT (SCCSS makes cde better minifies files)
var SCSS_DEST = './src/assets/css'; //OUTPUT DESTINATION
// compilation
gulp.task('compile_scss', function() {
gulp.src(SCSS_SRC) //calling src creating string of readable file moving to scss_src (input variable)
.pipe(sass().on('error', sass.logError)) //pipe is method in gulp allow to chain task together
.pipe(minifyCSSS()) //minifying th string
.pipe(rename({ suffix: '.min'})) //adding prefix min
.pipe(changed(SCSS_DEST)) //affecting changed file
.pipe(gulp.dest(SCSS_DEST)); //output
});
// detect ANY changes in scss_src
gulp.task('watch_scss', function() { //runs like a loop
gulp.watch(SCSS_SRC, ['compile_scss']);
});
// Run tasks as default when in cmd we call only gulp not mentioning gulp.task
gulp.task('default', gulp.series('browser-sync', 'watch_scss'));
AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (C:\Users\hrith\Desktop\react\my-app\node_modules\undertaker\lib\set-task.js:10:3)
at Gulp.task (C:\Users\hrith\Desktop\react\my-app\node_modules\undertaker\lib\task.js:13:8)
at Object.<anonymous> (C:\Users\hrith\Desktop\react\my-app\gulpfile.js:36:8)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
C:\Users\hrith\Desktop\react\my-app>**enter code here**