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

raygun's avatar

when I run gulp app.js is not produced

when I run gulp app.js is not produced.

according to the tutorial and the out put it should be there.
when I run gulp this is my output

   apples-MBP:L5App ray$ gulp
   [01:44:13] Using gulpfile ~/Desktop/laravel-tuts/L5App/gulpfile.js
   [01:44:13] Starting 'default'...
   [01:44:13] Starting 'less'...
   [01:44:13] Running Less: resources/assets/less/app.less
   [01:44:18] Finished 'default' after 4.3 s
   [01:44:20] gulp-notify: [Laravel Elixir] Less Compiled!
   [01:44:20] Finished 'less' after 7.27 s
   [01:44:20] Starting 'scripts'...
   [01:44:20] Merging: ./resources/assets/vendor/jquery/dist/jquery.min.js,               ./resources/assets/vendor/bootstrap/dist/js/bootstrap.min.js, ./resources/assets/vendor/bootstrap-select/dist/js/bootstrap-select.min.js
   [01:44:21] Finished 'scripts' after 319 ms
   [01:44:21] Starting 'copy'...
   [01:44:21] Copying resources/assets/js/app.js to: public/js/app.js
   [01:44:21] Copying ./resources/assets/vendor/font-awesome/fonts/** to: public/fonts
   [01:44:21] Finished 'copy' after 170 ms

this is my app.less file @import "font-awesome"; @import "bootstrap";

   @import "solarized";

   @import "bootstrap-select";

this is my gulpfile.js

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

   var bowerDir = './resources/assets/vendor/';

    var lessPaths = [
    bowerDir + "bootstrap/less",
    bowerDir + "font-awesome/less",
    bowerDir + "bootstrap-select/less"
    var elixir = require('laravel-elixir');

    var bowerDir = './resources/assets/vendor/';

   var lessPaths = [
   bowerDir + "bootstrap/less",
   bowerDir + "font-awesome/less",
   bowerDir + "bootstrap-select/less"
   ];

  /*
  |--------------------------------------------------------------------------
  | 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.
  |
  */

 elixir(function(mix) {
     mix.less('app.less', 'public/css', { paths: lessPaths })
         .scripts([
             'jquery/dist/jquery.min.js',
             'bootstrap/dist/js/bootstrap.min.js',
              'bootstrap-select/dist/js/bootstrap-select.min.js'
         ], 'public/js/vendor.js', bowerDir)
         .copy('resources/assets/js/app.js', 'public/js/app.js')
         .copy(bowerDir + 'font-awesome/fonts', 'public/fonts');

 });
 ];

 /*
  |--------------------------------------------------------------------------
| 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.
 |
 */

 elixir(function(mix) {
     mix.less('app.less', 'public/css', { paths: lessPaths })
        .scripts([
             'jquery/dist/jquery.min.js',
             'bootstrap/dist/js/bootstrap.min.js',
              'bootstrap-select/dist/js/bootstrap-select.min.js'
              ], 'public/js/vendor.js', bowerDir)
            .copy('resources/assets/js/app.js', 'public/js/app.js')
            .copy(bowerDir + 'font-awesome/fonts', 'public/fonts');

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

     var bowerDir = './resources/assets/vendor/';

      var lessPaths = [
      bowerDir + "bootstrap/less",
       bowerDir + "font-awesome/less",
       bowerDir + "bootstrap-select/less"
      ];

      /*
      |--------------------------------------------------------------------------
      | 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.
      |
     */

      elixir(function(mix) {
       mix.less('app.less', 'public/css', { paths: lessPaths })
             .scripts([
             'jquery/dist/jquery.min.js',
               'bootstrap/dist/js/bootstrap.min.js',
                'bootstrap-select/dist/js/bootstrap-select.min.js'
             ], 'public/js/vendor.js', bowerDir)
         .copy('resources/assets/js/app.js', 'public/js/app.js')
          .copy(bowerDir + 'font-awesome/fonts', 'public/fonts');

     });
  this is my gulpfile.js
   var elixir = require('laravel-elixir');

   var bowerDir = './resources/assets/vendor/';

    var lessPaths = [
     bowerDir + "bootstrap/less",
      bowerDir + "font-awesome/less",
     bowerDir + "bootstrap-select/less"
     ];

      /*
       |--------------------------------------------------------------------------
      | 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.
        |
       */

        elixir(function(mix) {
         mix.less('app.less', 'public/css', { paths: lessPaths })
             .scripts([
                  'jquery/dist/jquery.min.js',
                'bootstrap/dist/js/bootstrap.min.js',
                 'bootstrap-select/dist/js/bootstrap-select.min.js'
               ], 'public/js/vendor.js', bowerDir)
              .copy('resources/assets/js/app.js', 'public/js/app.js')
               .copy(bowerDir + 'font-awesome/fonts', 'public/fonts');

         });

my bower.json

 {
    "name":"L5App",
    "description":"Laravel 5 website tutorial",
    "license":"MIT",
    "private": true,
    "dependencies": {
      "bootstrap":"~3.3.4",
      "bootstrap-select": "~1.6.*",
      "font-awesome":"~4.3.0"
    }
  }

my .bowerrc file

    {
      "directory": "resources/assets/vendor"
    }
0 likes
2 replies
pixelpeter's avatar

Your gulp file contains the same code three times ! Why is that ?

Appkr's avatar

Try this. Just pass the path (without filename) as the 2nd arg in the copy method.

mix
    ...
    .copy('resources/assets/js/app.js', 'public/js')

Please or to participate in this conversation.