Task 'default' is not in your gulpfile
See original GitHub issueHello, I’m running node 0.12.7
, npm 2.11.3
on Win7, and running this code returns a ‘Task default is not in your gulpf file’:
[11:43:50] Using gulpfile ~\Web\mywebsite\gulpfile.js
[11:43:50] Task 'default' is not in your gulpfile
[11:43:50] Please check the documentation for proper gulpfile formatting
This is the code
var gulp = require('gulp'),
watch = require('gulp-watch'),
jade = require('gulp-jade'),
less = require('gulp-less');
// functions ----------------------
gulp.task('default', ['compile']);
gulp.task('compile', function() {
return gulp.src('./less/*.less')
.pipe(less())
.pipe(gulp.dest('./css'));
})
This are my installed modules:
├── browser-sync@2.7.13
├── gulp@3.9.0
├── gulp-coffee@2.3.1
├── gulp-jade@1.0.1
├── gulp-less@3.0.3
├── gulp-plumber@1.0.1
├── gulp-stylus@2.0.5
├── gulp-watch@4.3.3
├── lost@6.5.0
└── require-dir@0.3.0
Thanks
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
Task "default" is not in your gulpfile - Stack Overflow
When you just run gulp in your console it will look for a default task to run. You only defined live-server and serve...
Read more >gulp not working: Task 'default' is not in your gulpfile #1107
(Maybe Stackoverflow might be a better place.) But your gulpfile needs to have a default task. So you may need to include gulp.task('default', ......
Read more >task default is not in your gulp file - Blockchain Courses
The code looks correct to me. Make sure you installed gulp and gulp-cli globally with npm. So npm install -g gulp. Also the...
Read more >Task 'default' is not in your gulpfile - Laracasts
You might have had a faulty install. Try deleting your node_modules directory, and doing npm install again. I've found myself too that most...
Read more >Error: Task 'default' is not in your gulpfile - SugarClub
Error: Task 'default' is not in your gulpfile · Eugene Bychkov. 0 Eugene Bychkov over 3 years ago in reply to Marilia Girardi...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
maybe you should put the
gulp.task(‘default’, [‘compile’]);
after the compile task was defined? you can not bind the compile task into default before decare it?
This is related to where the tasks are defined prior to their use. JS natively hoists variables as can be found here but i’m not sure if that is different for node/gulp i’d assume not.
This is another good example explaining complications here.
I think this should be closed as theirs nothing gulp can really do. You could use manual hoisting by defining name function variables as opposed to defining them in gulp.task that should cause them to be hoisted.