davepartner / bootstrap4-udemy-clone

A clone of Udemy website using bootstrap. This is the project files from a tutorial.
https://www.youtube.com/watch?v=ut9H4QHbOB4&list=PLnBvgoOXZNCN20--39IKuF_DbINp4JfLq
46 stars 31 forks source link

AssertionError [ERR_ASSERTION]: Task function must be specified #1

Open nevits8as opened 6 years ago

nevits8as commented 6 years ago

I get this error when i tray to run gulp watch AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\laragon\www\trebian\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (C:\laragon\www\trebian\node_modules\undertaker\lib\task.js:13:8) at Object.<anonymous> (C:\laragon\www\trebian\gulpfile.js:30:6) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18)

This is my gulpfile

gulpfile.js

var gulp  = require('gulp'),
  sass = require('gulp-sass'),
  sourcemaps = require('gulp-sourcemaps'),
  cleanCss = require('gulp-clean-css'),
  rename = require('gulp-rename'),
  postcss      = require('gulp-postcss'),
  autoprefixer = require('autoprefixer');

gulp.task('build-theme', function() {
  return gulp.src(['resources/sass/*.scss'])
    .pipe(sourcemaps.init())
    .pipe(sass().on('error', sass.logError))
    .pipe(postcss([ autoprefixer({ browsers: [
      'Chrome >= 35',
      'Firefox >= 38',
      'Edge >= 12',
      'Explorer >= 10',
      'iOS >= 8',
      'Safari >= 8',
      'Android 2.3',
      'Android >= 4',
      'Opera >= 12']})]))
    .pipe(sourcemaps.write())
    .pipe(gulp.dest('public/css/'))
    .pipe(cleanCss())
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest('public/css/'))
});

gulp.task('watch', ['build-theme'], function() {
  gulp.watch(['resources/sass/*.scss'], ['build-theme']);
});

gulp.task('default', ['build-theme'], function() {
});

I have NPM 6.4.1

davepartner commented 6 years ago

Compare my code to yours. My source code is at github.com/daveozoalor

On Sat, Sep 22, 2018, 12:08 AM nevits8as notifications@github.com wrote:

I get this error when i tray to run gulp watch AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\laragon\www\trebian\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (C:\laragon\www\trebian\node_modules\undertaker\lib\task.js:13:8) at Object. (C:\laragon\www\trebian\gulpfile.js:30:6) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18)

This is my gulpfile gulpfile.js

var gulp = require('gulp'), sass = require('gulp-sass'), sourcemaps = require('gulp-sourcemaps'), cleanCss = require('gulp-clean-css'), rename = require('gulp-rename'), postcss = require('gulp-postcss'), autoprefixer = require('autoprefixer');

gulp.task('build-theme', function() { return gulp.src(['resources/sass/*.scss']) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(postcss([ autoprefixer({ browsers: [ 'Chrome >= 35', 'Firefox >= 38', 'Edge >= 12', 'Explorer >= 10', 'iOS >= 8', 'Safari >= 8', 'Android 2.3', 'Android >= 4', 'Opera >= 12']})])) .pipe(sourcemaps.write()) .pipe(gulp.dest('public/css/')) .pipe(cleanCss()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('public/css/')) });

gulp.task('watch', ['build-theme'], function() { gulp.watch(['resources/sass/*.scss'], ['build-theme']); });

gulp.task('default', ['build-theme'], function() { });

I have NPM 6.4.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/daveozoalor/bootstrap4-udemy-clone/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9rfA94HV3Xwuskr5xQEGxcm6wlmstcks5udXFegaJpZM4W0_M9 .

Martin-Gee commented 4 years ago

Compare my code to yours. My source code is at github.com/daveozoalor On Sat, Sep 22, 2018, 12:08 AM nevits8as @.**> wrote: I get this error when i tray to run gulp watch AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\laragon\www\trebian\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (C:\laragon\www\trebian\node_modules\undertaker\lib\task.js:13:8) at Object. (C:\laragon\www\trebian\gulpfile.js:30:6) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) This is my gulpfile gulpfile.js var gulp = require('gulp'), sass = require('gulp-sass'), sourcemaps = require('gulp-sourcemaps'), cleanCss = require('gulp-clean-css'), rename = require('gulp-rename'), postcss = require('gulp-postcss'), autoprefixer = require('autoprefixer'); gulp.task('build-theme', function() { return gulp.src(['resources/sass/.scss']) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(postcss([ autoprefixer({ browsers: [ 'Chrome >= 35', 'Firefox >= 38', 'Edge >= 12', 'Explorer >= 10', 'iOS >= 8', 'Safari >= 8', 'Android 2.3', 'Android >= 4', 'Opera >= 12']})])) .pipe(sourcemaps.write()) .pipe(gulp.dest('public/css/')) .pipe(cleanCss()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('public/css/')) }); gulp.task('watch', ['build-theme'], function() { gulp.watch(['resources/sass/*.scss'], ['build-theme']); }); gulp.task('default', ['build-theme'], function() { }); I have NPM 6.4.1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9rfA94HV3Xwuskr5xQEGxcm6wlmstcks5udXFegaJpZM4W0_M9 .

Please i checked out your YouTube video, how do i get the Boostrap 4 Course?

davepartner commented 4 years ago

It's free there on YouTube.

On Mon, Feb 10, 2020, 9:11 PM Martin-Gee notifications@github.com wrote:

Compare my code to yours. My source code is at github.com/daveozoalor … <#m-163693124102582768> On Sat, Sep 22, 2018, 12:08 AM nevits8as @.*> wrote: I get this error when i tray to run gulp watch AssertionError [ERR_ASSERTION]: Task function must be specified at Gulp.set [as _setTask] (C:\laragon\www\trebian\node_modules\undertaker\lib\set-task.js:10:3) at Gulp.task (C:\laragon\www\trebian\node_modules\undertaker\lib\task.js:13:8) at Object. (C:\laragon\www\trebian\gulpfile.js:30:6) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) This is my gulpfile gulpfile.js var gulp = require('gulp'), sass = require('gulp-sass'), sourcemaps = require('gulp-sourcemaps'), cleanCss = require('gulp-clean-css'), rename = require('gulp-rename'), postcss = require('gulp-postcss'), autoprefixer = require('autoprefixer'); gulp.task('build-theme', function() { return gulp.src(['resources/sass/.scss']) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(postcss([ autoprefixer({ browsers: [ 'Chrome >= 35', 'Firefox >= 38', 'Edge >= 12', 'Explorer >= 10', 'iOS >= 8', 'Safari >= 8', 'Android 2.3', 'Android >= 4', 'Opera >= 12']})])) .pipe(sourcemaps.write()) .pipe(gulp.dest('public/css/')) .pipe(cleanCss()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('public/css/')) }); gulp.task('watch', ['build-theme'], function() { gulp.watch(['resources/sass/.scss'], ['build-theme']); }); gulp.task('default', ['build-theme'], function() { }); I have NPM 6.4.1 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1 https://github.com/daveozoalor/bootstrap4-udemy-clone/issues/1>, or mute the thread https://github.com/notifications/unsubscribe-auth/AA9rfA94HV3Xwuskr5xQEGxcm6wlmstcks5udXFegaJpZM4W0_M9 .

Please i checked out your YouTube video, how do i get the Boostrap 4 Course?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/daveozoalor/bootstrap4-udemy-clone/issues/1?email_source=notifications&email_token=AAHWW7CH74BDNEIBNS6SHULRCGKFLA5CNFSM4FWT6M62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJQ2HY#issuecomment-584256799, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHWW7B4FZ55ZYAUWN2R5DTRCGKFLANCNFSM4FWT6M6Q .