gulp-sass のエラー
Gulpで急にエラーが出るようになってしまい、なんじゃ〜と調べたら、Gulpfileの設定が悪かった。
エラー
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
Error in plugin "gulp-sass" Message: node_modules/node-sass/test/fixtures/depth-first/a.scss Error: It's not clear which file to import for '@import "a1"'. Candidates: a1.scss a1.css Please delete or rename all but one of these files. on line 2 of node_modules/node-sass/test/fixtures/depth-first/a.scss >> @import "a1"; ^ Details: status: 1 file: /path/node_modules/node-sass/test/fixtures/depth-first/a.scss line: 2 column: 1 formatted: Error: It's not clear which file to import for '@import "a1"'. Candidates: a1.scss a1.css Please delete or rename all but one of these files. on line 2 of node_modules/node-sass/test/fixtures/depth-first/a.scss >> @import "a1"; ^ messageFormatted: node_modules/node-sass/test/fixtures/depth-first/a.scss Error: It's not clear which file to import for '@import "a1"'. Candidates: a1.scss a1.css Please delete or rename all but one of these files. on line 2 of node_modules/node-sass/test/fixtures/depth-first/a.scss >> @import "a1"; ^ messageOriginal: It's not clear which file to import for '@import "a1"'. Candidates: a1.scss a1.css Please delete or rename all but one of these files. relativePath: node_modules/node-sass/test/fixtures/depth-first/a.scss |
原因
gulp sass の設定で、scssのディレクトリを
.src(‘**/*.scss’)
と設定していたため、
node_modules 配下のファイルも対象になってしまっていた。
修正
専用ディレクトリを作成して、
そこにファイルをすべて置き、gulpfileも修正。