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

rolando13's avatar

Hi, I'm running tasks with laravel-elixir and gulp, trying to watch angular js and sass files, the error I'm getting when I run gulp watch is the following:

'watch-assets' errored after 10 ms [10:19:16] Error: watch ENOSPC at errnoException (fs.js:1030:11) at FSWatcher.start (fs.js:1062:11) at Object.fs.watch (fs.js:1087:11) at Gaze._watchDir (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30) at /home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10 at iterate (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5) at Object.forEachSeries (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3) at Gaze._initWatched (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10) at Gaze.add (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:177:8) at new Gaze (/home/rolando/Documents/Projects/Ocupassion/training/subscribe/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:74:10) Error running task sequence: { task: 'watch-assets', message: 'watch-assets catch', duration: 0.010231995, hrDuration: [ 0, 10231995 ], err: { [Error: watch ENOSPC] code: 'ENOSPC', errno: 'ENOSPC', syscall: 'watch' } }

My gulpifile looks like:

var elixir = require('laravel-elixir');
var gulp = require('gulp');
require('laravel-elixir-angular');
require('laravel-elixir-sass-compass');

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Less
 | file for our application, as well as publishing vendor resources.
 |
 */

var paths = {
  jquery: 'vendor/bower_components/jquery/',
  angular:'vendor/bower_components/angular/',
  bootstrap: 'vendor/bower_components/bootstrap-sass-official/assets/',
}

elixir(function(mix) {
  mix.angular("resources/assets/angular/", "public/js/", "application.js");
  mix.sass('style.scss','public/css/')
    .copy(paths.bootstrap + 'fonts/bootstrap/**', 'public/fonts')
    .copy(paths.bootstrap + 'stylesheets/**', 'public/css')
    .scripts([
      paths.jquery + 'dist/jquery.js',
      paths.bootstrap + 'javascripts/bootstrap.js',
      paths.angular + 'angular.min.js'
    ],'public/js/app.
});

I will much appreciate anyone help :)

thethan's avatar

I know I am late to this game and to the thread but I had been using Grunt and outdated php frameworks at my company and recently made the switch to laravel. So now getting into development is a bit of a hassle which, do not get me wrong, laravel and laravel elixir has made it a much easier transition.

Besides Behat i feel like it is missing SVG/Sprite maker. I maybe in the minority in this one but really loved using it in grunt and made the assets a lot easier to manage.

mtpultz's avatar

Is there a way to add a task dependency to a extended elixir task for example be able to run clean-scripts prior to running the template cache?

gulp.task('templatecache', ['clean-scripts'], function () {

            return gulp.src(config.html.templates)
                       .pipe(notify("Create AngularJS $templateCache"))
                       .pipe($.minifyHtml({empty: true}))
                       .pipe($.angularTemplatecache(
                           config.templateCache.file,
                           config.templateCache.options
                       ))
                       .pipe(gulp.dest(config.templateCache.output));
});
midascodebreaker's avatar

I would love to share this guide... if you love vuejs and its components share by the community... but find it hard to integrate in your gulp file this guide will help you set up a webpack extension

that gives you all the flexibility to use all vuejs components that is compiled by webpack...

There is no decent guide, and so many ext that can get you confuse... THIS IS THE MUST SHARE FOR ALL VUE JS LARAVEL DEV

https://laracasts.com/discuss/channels/tips/guide-add-webpack-to-your-laravel-elixir-ext
Previous

Please or to participate in this conversation.