OverZealous / run-sequence

Run a series of dependent gulp tasks in order
MIT License
961 stars 56 forks source link

Error when passing empty string #64

Closed yairEO closed 8 years ago

yairEO commented 8 years ago

I randomly (gulp works until it suddenly decides to stop and crash) get an error message, after adding lines like this: (using a optional gulp-util env variable when running gulp --test)

gulp.watch('templates/**/*.html', function(){ runSequence('templates', 'bundleJS', gutil.env.test ? 'tests' : '') });

Error output:

C:\www\project\node_modules\ttf2woff2\jssrc\ttf2woff2.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?
Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Modul
e[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var
ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;
var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!M
odule["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printEr
r"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["
read"]=function read(filename,binary){filename=nodePath["normalize"](filename);var ret=nodeFS["readFileSync"](filenam

Error: Task  is not configured as a task on gulp.  If this is a submodule, you may need to use require('run-sequence').u
se(gulp).
    at C:\www\project\node_modules\run-sequence\index.js:20:10
    at Array.forEach (native)
    at verifyTaskSets (C:\www\project\node_modules\run-sequence\index.js:13:11)
    at runSequence (C:\www\project\node_modules\run-sequence\index.js:94:2)
    at C:\www\project\gulpfile.js:515:51
    at Gaze.<anonymous> (C:\www\project\node_modules\glob-watcher\index.js:18:14)
    at emitTwo (events.js:100:13)
    at Gaze.emit (events.js:185:7)
    at Gaze.emit (C:\www\project\node_modules\gaze\lib\gaze.js:129:32)
    at C:\www\project\node_modules\gaze\lib\gaze.js:415:16
    at StatWatcher._pollers.(anonymous function) (C:\www\project\node_modules\gaze\lib\gaze.js:326:7)
    at emitTwo (events.js:100:13)
    at StatWatcher.emit (events.js:185:7)
    at StatWatcher._handle.onchange (fs.js:1369:10)

I think there is some problem here... is this run-sequence related?

OverZealous commented 8 years ago

It's working as expected, it even tells you the error. You can only pass valid tasks to runSequence.

Note: This is not getting changed.

yairEO commented 8 years ago

may I ask if it's a lot of work to ignore null or empty strings? maybe I can hack it if you will say it can be quickly done..

OverZealous commented 8 years ago

I've already had this discussion with others. I'm not changing the library to ignore invalid tasks.

OverZealous commented 7 years ago

Hey, I know this is an older issue, but just to let you know, I added this in as an option, but you have to opt-in to the behavior.

Please see the new Options section in the readme, thanks.