We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9219fee commit 83bbab6Copy full SHA for 83bbab6
lib/cli.js
@@ -143,7 +143,14 @@ Cli.run = function run(processArgv) {
143
logging.logger.debug('Gulpfile found');
144
var beforeHook = argv._[0] + ':before';
145
var afterHook = argv._[0] + ':after';
146
- var gulp = require(path.resolve(process.cwd() + '/node_modules/gulp'));
+ try {
147
+ var gulp = require(path.resolve(process.cwd() + '/node_modules/gulp'));
148
+ } catch(e) {
149
+ // Empty gulpfile (or one that doesn't require gulp?), and no gulp
150
+ console.error('Gulpfile detected, but gulp is not installed');
151
+ console.error('Do you need to npm install?\n');
152
+ process.exit(1);
153
+ }
154
logEvents(gulp);
155
156
return Q.nfcall(gulp.start.bind(gulp), beforeHook).then(
0 commit comments