Laravel Elixir - gulp手表自动尝试生产并抛出错误

时间:2017-10-11 15:38:52

标签: laravel-5 gulp gulp-watch laravel-elixir

我有一个我从朋友那里得到的项目,我设置了环境。

现在,当我尝试gulp时,它可以正常工作和编译。但是,如果我尝试运行gulp watch,则会抛出错误:

internal/streams/legacy.js:59
      throw er; // Unhandled stream error in pipe.
      ^

Error: ENOENT: no such file or directory, stat '/home/vagrant/Code/proj/public/
build/js/all-86db1d88de.js'

据我了解,它正试图强迫生产或缩小,而运行gulp并不是这样有效。

我对gulp watch做错了什么?

除了我以外的其他人都可以使用gulp watch。我们的gulp版本是相同的 - 3.9.1,但节点版本不同,它们的版本是6.5.0,我的版本是7.10.1

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

require('laravel-elixir-vue');

/*
 |--------------------------------------------------------------------------
 | 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 Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(mix => {

    mix.sass([
        'app.scss'
    ], 'resources/assets/css/app.css')

    mix.styles([
        'resources/assets/css/custom.css',
        'resources/assets/css/app.css',
        'node_modules/sweetalert/dist/sweetalert.css',
    ],'public/css/all.css','./')

    mix.webpack('app.js','resources/assets/js/webpack-app.js')


    mix.scripts([
        'resources/assets/js/webpack-app.js',
        'node_modules/sweetalert/dist/sweetalert-dev.js',
        'node_modules/parsleyjs/dist/parsley.min.js',
        'resources/assets/js/parsley-custom.js',
        'resources/assets/js/custom.js',
    ],'public/js/all.js','./')

    mix.version(['css/all.css', 'js/all.js'])

    mix.copy('resources/assets/js/libs/salvattore.min.js', 'public/js/libs');

    mix.copy('node_modules/font-awesome/fonts', 'public/build/fonts');
});

0 个答案:

没有答案