Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

amnuts's avatar

Task 'default' is not in your gulpfile

I'm trying to build a very simple elixir gulp file but am running into problems right from the start. I've installed everything with npm (npm install --no-bin-links), I have the gulp version 3.9.1 (as shown with gulp -v) and my gulp file looks like:

var elixir = require('laravel-elixir');

elixir(function(mix) {
    mix.copy('node_modules/font-awesome/fonts', 'public/assets/fonts');

    mix.sass(
        'app.scss',
        'public/assets/css/site.css',
        {
            includePaths: [
                'node_modules/foundation-sites/scss',
                'node_modules/font-awesome/scss'
            ]
        }
    );

    mix.babel(
        [
            'vendor/jquery.js',
            'vendor/fastclick.js'
        ],
        'public/assets/js/site.js',
        'node_modules/foundation-sites/js/'
    );

    mix.version([
        'assets/js/site.js',
        'assets/css/site.css'
    ]);
});

So really nothing out of the ordinary. However, when I run gulp on the command line I just get back the message:

[08:58:42] Using gulpfile D:\git\laravel\initial\gulpfile.js
[08:58:42] Task 'default' is not in your gulpfile
[08:58:42] Please check the documentation for proper gulpfile formatting

Where am I going wrong? Any help is appreciated!

0 likes
4 replies
amnuts's avatar

I had really hoped that would work but unfortunately it didn't. :-( Maybe I'll just start with a stock laravel install and see how it goes from there.

amnuts's avatar

Just to conclude on this one...

I ended up having to run a new project-based homestead to install all the requirements via npm (my global homestead didn't work). I also had to do this via an administrator cmd prompt because it was complaining about symlinks (the host was Windows 10). So in the end, using vagrant ssh saved the day a little.

I just used the exact same project files from my git repo on my work machine and everything worked straight from the Windows command prompt, without homestead, as it should have when I started this thread! So in the end, I think it's just that something is cheesed with my setup on the other PC (perhaps a conflicting node/npm version, as they are different to my work machine).

Please or to participate in this conversation.