sass won't compile, file unreadable or not found

ぃ、小莉子 提交于 2019-12-23 18:45:03

问题


Conversion error: Jekyll::Converters::Sass encountered an error while converti ng 'assets/css/all.sass': File to import not found or unreadable: 1-tools/-tools-dir. on line 1

That is the error i get every time i run Jekyll and i can't seem to fix it. I've tried everything that i found on Google and still can't seem to make it work. Any idea what is wrong with the includes?

My files are like this:

_-tools-dir.sass
@import 'bourbon/bourbon'
@import 'fonts'
@import 'normalize'
@import 'vars'

_-sections-dir.sass
@import 'header'

all.sass

---
---

@import '1-tools/-tools-dir'
@import '2-base/-base-dir'
@import '3-sections/-sections-dir'

and in base-dir i have no includes yet so the file is empty


回答1:


With default Jekyll settings, all sass/scss/coffee imports are supposed to be in _sass folder.

Your @import '1-tools/-tools-dir' import rule is looking for _sass/1-tools/-tools-dir.sass file and not _sass/1-tools/_-tools-dir.sass (note the underscrore).

You can change the import to @import '1-tools/_-tools-dir or change the file name to -tools-dir.sass.

Same for other imports that will cause the same not found error.




回答2:


you're probably doing the YouTube tutorial from DevTips (which is a pretty good one imo).

Add this to your config.yml:

sass:
  sass_dir: assets/css
  style: :nested


来源:https://stackoverflow.com/questions/32045976/sass-wont-compile-file-unreadable-or-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!