0

一切正常,我能够正常运行 gulp 和 gulp watch,但在我的 phpspec 文件中进行了一些更改后,它不再工作了。请参阅下面的详细信息。

这是我的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",
        }
    );
});

这是运行 gulp 后的输出:

[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

似乎 run-sequence 缺少一个模块,但我没有找到它。

4

1 回答 1

0

问题解决了,我删除了我的 node_modules 文件夹并npm install && npm update再次应用。看起来我的一个图书馆被损坏了,我不知道为什么。

于 2016-06-05T23:48:14.680 回答