2016-06-05 6 views
0

Все работает, и я мог нормально запускать gulp и gulp watch, после некоторых изменений в моих файлах phpspec он больше не работает. См. Подробности ниже.Выполнение gulp внутри проекта Laravel завершается неудачей при смешивании стилей и/или компиляции файлов sass

Это мой gulpfile.js

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

elixir(function (mix) { 

    mix.phpUnit().phpSpec(); 

    // this task should look for files inside the resources/assets/sass 
    // folder. 
    mix.sass(
     [ 
      './resources/assets/bower/bootstrap-sass/assets/stylesheets/_bootstrap.scss', 
      '**', 
     ], 
     'resources/assets/css/sass.css' 
    ); 

    // this task should look for files inside the resources/assets/css 
    // folder. 
    mix.styles(
     [ 
      '**', 
     ], 
     'public/css/all.css' 
    ); 

    // this task should look for files inside the resources/assets/js 
    // folder. 
    mix.scripts(
     [ 
      './resources/assets/bower/jquery/dist/jquery.js', 
      './resources/assets/bower/bootstrap-sass/assets/javascripts/bootstrap.js', 
      '**', 
     ], 
     'public/js/app.js' 
    ); 

    mix.version(
     [ 
      "css/all.css", 
      "js/app.js", 
     ] 
    ); 

    mix.browserSync(
     { 
      proxy: "localhost:8000", 
     } 
    ); 
}); 

И это выход после глотка запущенного:

[19:00:44] Using gulpfile ~/Public/forsale/gulpfile.js 
[19:00:44] Starting 'default'... 
[19:00:44] Starting 'PHPUnit'... 

Triggering PHPUnit: vendor/bin/phpunit --verbose 
[19:00:44] Finished 'default' after 44 ms 
PHPUnit 4.8.26 by Sebastian Bergmann and contributors. 

Runtime: PHP 7.0.4-7ubuntu2.1 
Configuration: /home/rafael/Public/forsale/phpunit.xml 

. 

Time: 49 ms, Memory: 8.00MB 

OK (1 test, 1 assertion) 
[19:00:44] gulp-notify: [Green!] Your PHPUnit tests passed! 
[19:00:44] Finished 'PHPUnit' after 144 ms 
[19:00:44] Starting 'PHPSpec'... 

Triggering PHPSpec: vendor/bin/phpspec run 
/skipped: 0%/pending: 0%/passed: 100%/failed: 0% /broken: 0% /2 examples 
1 specs 
2 examples (2 passed) 
5ms 

[19:00:44] gulp-notify: [Green!] Your PHPSpec tests passed! 
[19:00:44] Finished 'PHPSpec' after 84 ms 
[19:00:44] Starting 'sass'... 

Fetching Sass Source Files... 
    - ./resources/assets/bower/bootstrap-sass/assets/stylesheets/_bootstrap.scss 


Saving To... 
    - resources/assets/css/sass.css 

[19:00:44] 'sass' errored after 104 ms 
[19:00:44] Error: Cannot find module './flex-Spec' 
    at Function.Module._resolveFilename (module.js:326:15) 
    at Function.Module._load (module.js:277:25) 
    at Module.require (module.js:354:17) 
    at require (internal/module.js:12:17) 
    at Object.<anonymous> (/home/rafael/Public/forsale/node_modules/autoprefixer-core/lib/hacks/flex.js:6:14) 
    at Object.<anonymous> (/home/rafael/Public/forsale/node_modules/autoprefixer-core/lib/hacks/flex.js:58:4) 
    at Module._compile (module.js:410:26) 
    at Object.Module._extensions..js (module.js:417:10) 
    at Module.load (module.js:344:32) 
    at Function.Module._load (module.js:301:12) 
[19:00:44] Error in plugin 'run-sequence(sass)' 
Message: 
    sass catch 

кажется, что вводная последовательность имеет недостающий модуль, но я не нашел его.

ответ

0

Проблема была решена, я удалил папку node_modules и снова применил npm install && npm update. Похоже, что одна из моих библиотек была повреждена, и я не знаю, почему.