![](/img/trans.png)
[英]Laravel mix compiling vuetify styles.sass to empty css file
[英]running gulp inside a Laravel project fails when mixing styles and/or compiling sass files
一切正常,我能夠正常運行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
似乎運行序列缺少模塊,但我沒有找到它。
問題已解決,我刪除了node_modules文件夾並再次應用了npm install && npm update
。 看來我的圖書館之一已損壞,我也不知道為什么。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.