I am using Gulp 3.9.1, node 5.7.1, npm 3.10.3, and WebStorm 2016.1. When I try to setup gulp for my project, I get the following error:
/usr/local/bin/node /Users/msbauer/Developer/workspaces/provider-data-management/node_modules/gulp/bin/gulp.js --color --gulpfile /Users/msbauer/Developer/workspaces/provider-data-management/gulpfile.js
error: unknown option `--color'
Process finished with exit code 1
And when I force to rescan tasks:
Failed to list gulp tasks in provider-data-management/gulpfile.js: process finished with exit code 1 (a non-zero exit code means an error)
* Edit settings
$ /usr/local/bin/node /Users/msbauer/Developer/workspaces/provider-data-management/node_modules/gulp/bin/gulp.js --no-color --gulpfile /Users/msbauer/Developer/workspaces/provider-data-management/gulpfile.js --tasks
error: unknown option `--no-color'
Process finished with exit code 1
When I execute gulp --help
at CLI:
$ gulp --help
Usage: gulp [options] [command]
Commands:
about display version information about availity-workflow project
init initialize project metadata: package.json, bower.json, availity.json and README.md
Options:
-h, --help output usage information
-V, --version output the version number
It's almost as if WebStorm is tacking on extra params, but the version of gulp I have doesn't support said params.
Updated:
I ran the following to installed gulp-cli (the second from my project root):
$ brew install gulp-cli
$ npm install -g gulp-cli
If I do gulp --help
I get the right options:
$ gulp --help
Usage: gulp [options] tasks
Options:
--help, -h Show this help. [boolean]
--version, -v Print the global and local gulp versions. [boolean]
--require Will require a module before running the gulpfile. This is
useful for transpilers but also has other applications.
[string]
--gulpfile Manually set path of gulpfile. Useful if you have multiple
gulpfiles. This will set the CWD to the gulpfile directory as
well. [string]
--cwd Manually set the CWD. The search for the gulpfile, as well as
the relativity of all requires will be from here. [string]
--verify Will verify plugins referenced in project's package.json
against the plugins blacklist.
--tasks, -T Print the task dependency tree for the loaded gulpfile.
[boolean]
--depth Specify the depth of the task dependency tree.
--tasks-simple Print a plaintext list of tasks for the loaded gulpfile.
[boolean]
--tasks-json Print the task dependency tree, in JSON format, for the
loaded gulpfile.
--color Will force gulp and gulp plugins to display colors, even when
no color support is detected. [boolean]
--no-color Will force gulp and gulp plugins to not display colors, even
when color support is detected. [boolean]
--silent, -S Suppress all gulp logging. [boolean]
--continue Continue execution of tasks upon failure. [boolean]
--log-level, -L Set the loglevel. -L for least verbose and -LLLL for most
verbose. -LLL is default. [count]
which
returns the path /Users/me/Developer/homebrew/bin/gulp
. But if I run gulp --color
I still get the error error: unknown option
--color'`
If I do the same experiment using the gulp path of ~/Developer/workspace/project/node_modules/gulp-cli/bin/gulp.js --help
(again, from CLI) I get the exact same results: --help
outputs the correct options, but --color
and --no-color
fails with the same error, despite being listed as valid options.