0
私は以前よりZara Foundation(sass)でLaravel 5.3プロジェクトを開始しました。 gulpfile.jsをコンフィグレーションしてを編集していましたが、今日までコンパイルを中止したところまでが正常に動作していました。 それは数日前にを働いた。 私はインポートするファイルが見つからないか、読み込めない:util/util
...間のエラーでコードに触れたり、何かをアップグレードしなかった:私は本当にあなたが必要とする他に何を知っているが、ここで私のgulpfileありません
MBP-Nicolas:v1 nicolas$ gulp
[15:50:09] Using gulpfile ~/Documents/Developpement/PHP/Laravel/Project/v1/gulpfile.js
[15:50:09] Starting 'default'...
[15:50:09] Starting 'sass'...
Fetching Sass Source Files...
- resources/assets/sass/app.scss
Saving To...
- public/css/app.css
[15:50:11] Finished 'default' after 1.31 s
[15:50:11] gulp-notify: [Laravel Elixir] Sass Compilation Failed: resources/assets/sass/_settings.scss
Error: File to import not found or unreadable: util/util
Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss
on line 43 of resources/assets/sass/_settings.scss
>> @import 'util/util';
^
{ [Error: resources/assets/sass/_settings.scss
Error: File to import not found or unreadable: util/util
Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss
on line 43 of resources/assets/sass/_settings.scss
>> @import 'util/util';
^
]
status: 1,
file: '/Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss',
line: 43,
column: 1,
message: 'resources/assets/sass/_settings.scss\nError: File to import not found or unreadable: util/util\n Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss\n on line 43 of resources/assets/sass/_settings.scss\n>> @import \'util/util\';\n ^\n',
formatted: 'Error: File to import not found or unreadable: util/util\n Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss\n on line 43 of resources/assets/sass/_settings.scss\n>> @import \'util/util\';\n ^\n',
messageFormatted: '\u001b[4mresources/assets/sass/_settings.scss\u001b[24m\nError: File to import not found or unreadable: util/util\n Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss\n on line 43 of resources/assets/sass/_settings.scss\n>> @import \'util/util\';\n ^\n',
messageOriginal: 'File to import not found or unreadable: util/util\nParent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss',
relativePath: 'resources/assets/sass/_settings.scss',
name: 'Error',
stack: 'Error: resources/assets/sass/_settings.scss\nError: File to import not found or unreadable: util/util\n Parent style sheet: /Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/resources/assets/sass/_settings.scss\n on line 43 of resources/assets/sass/_settings.scss\n>> @import \'util/util\';\n ^\n\n at options.error (/Users/nicolas/Documents/Developpement/PHP/Laravel/Project/v1/node_modules/node-sass/lib/index.js:292:26)',
showStack: false,
showProperties: true,
plugin: 'gulp-sass' }
[15:50:11] Finished 'sass' after 1.38 s
[15:50:11] Starting 'copy'...
Fetching Copy Source Files...
- node_modules/font-awesome/fonts/**/*
Saving To...
- public/fonts
[15:50:11] Finished 'copy' after 55 ms
[15:50:11] Starting 'styles'...
Fetching Styles Source Files...
- node_modules/font-awesome/css/font-awesome.min.css
- public/css/app.css
Saving To...
- public/css/all.css
[15:50:11] gulp-notify: [Laravel Elixir] Stylesheets Merged!
[15:50:11] Finished 'styles' after 95 ms
[15:50:11] Starting 'scripts'...
Fetching Scripts Source Files...
- node_modules/jquery/dist/jquery.js
- node_modules/foundation-sites/dist/foundation.min.js
- resources/assets/js/main.js
Saving To...
- public/js/all.js
[15:50:12] gulp-notify: [Laravel Elixir] Scripts Merged!
[15:50:12] Finished 'scripts' after 1.3 s
を:
var elixir = require('laravel-elixir');
elixir(function(mix) {
//Compilation SASS
mix.sass('app.scss', null, null, { includePaths: ['node_modules/foundation-sites/scss'] });
//Copy of fonts
mix.copy('node_modules/font-awesome/fonts', 'public/fonts');
//Compilation CSS
mix.styles([
'../../../node_modules/font-awesome/css/font-awesome.min.css',
'../../../public/css/app.css'
]);
//Compilation JavaScript
var JSJquery = '../../../node_modules/jquery/dist/jquery.js';
var JSFoundation = '../../../node_modules/foundation-sites/dist/foundation.min.js';
mix.scripts([
JSJquery,
/*JSFoundation + 'foundation.core.js',
JSFoundation + 'foundation.util.keyboard.js',
JSFoundation + 'foundation.util.box.js',
JSFoundation + 'foundation.util.triggers.js',
JSFoundation + 'foundation.util.mediaQuery.js',
JSFoundation + 'foundation.util.motion.js',
JSFoundation + 'foundation.reveal.js',
JSFoundation + 'foundation.offcanvas.js',*/
JSFoundation,
'main.js'
]);
});
_settings.scssの43行目は@import 'util/util';
です。 それが有用である場合は、ツールのいくつかのバージョン:
- ノード-v:v4.6.0は
- NPM -v:2.15.9
- SASSの-v:サス3.4.15(選択 スティーブ)
しかし、私が言ったように、私はそれをアップグレードすることを思い出さない。
ありがとうございました。
お返事ありがとうございます。ファイルの場所は正しいです。画像:http://img11.hostingpics.net/pics/784570util.png –
「サスタスク」とは何ですか? –
gulpfile.jsにはsassという名前のgulpタスクが必要です。このようなもの... 'gulp.task( 'sass'、function(){...});'。コンテンツを貼り付けると、トラブルシューティングに役立ちます。 – Davey