sass无法编译,文件不可读或找不到 [英] sass won't compile, file unreadable or not found

查看:180
本文介绍了sass无法编译,文件不可读或找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

转换错误:Jekyll :: Converters :: Sass在converti时遇到错误 ng'assets/css/all.sass': 找不到导入文件或文件不可读:1-tools/-tools-dir. 在第1行

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

这是我每次运行Jekyll时遇到的错误,而且似乎无法修复.我已经尝试了在Google上找到的所有内容,但似乎仍然无法正常运行. 知道包含内容有什么问题吗?

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?

我的文件是这样的:

_-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'

并且在base-dir中我还没有包含文件,因此文件为空

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

推荐答案

使用默认的Jekyll设置,所有 sass/scss/coffee 导入都应该位于_sass文件夹中.

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

您的@import '1-tools/-tools-dir'导入规则正在查找_sass/1-tools/-tools-dir.sass文件而不是_sass/1-tools/_-tools-dir.sass(注意下划线).

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).

您可以将导入更改为@import '1-tools/_-tools-dir或将文件名更改为-tools-dir.sass.

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.

这篇关于sass无法编译,文件不可读或找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆