简体   繁体   English

sass / bulma错误:错误:找不到导入文件或不可读:Utility / mixins.sass

[英]sass/bulma error : Error: File to import not found or unreadable: utilities/mixins.sass

]I am trying to compile a css file from sass. ]我正在尝试从sass编译一个CSS文件。 I am using bulma (bulma.io) as the css framework. 我正在使用bulma(bulma.io)作为CSS框架。 Here is the directory structure I have 这是我的目录结构 在此处输入图片说明

I am trying to change the grid.sass to output.css 我正在尝试将grid.sass更改为output.css

and I am running this command from the "bulma" dir 我从“ bulma”目录运行此命令

 sass grid.sass output.css

but I get the following error 但我收到以下错误

Error: File to import not found or unreadable: utilities/mixins.sass.
        on line 1 of grid.sass
  Use --trace for backtrace.

I don't know why this error is appearing. 我不知道为什么会出现此错误。 I am running this according the documentation. 我正在根据文档运行此文件。 I am on CentOs machine, and have gem installed. 我在CentOs机器上,并安装了gem。

[root@foo bulma]# sass -v
Sass 3.4.23 (Selective Steve)

I'm not too familiar with the sass gem, however according to their docs, you would not use quotes and add semicolons. 我对Sass gem不太熟悉,但是根据他们的文档,您不会使用引号和添加分号。 So I assume something like: 所以我假设是这样的:

@import utilities/mixins;

Import - Sass Docs 导入-Sass文档

You might also need to rename your grid file to have an underscore, as mentioned in their docs as well. 您可能还需要重命名网格文件以使其具有下划线,如其文档中所述。

I was getting similar error in when I was using bulma-extensions . 我在使用bulma-extensions时遇到类似的错误。 To fix it, I had to update the import statement from 要解决此问题,我必须从

@import 'bulma/sass/utilities/_all.sass'

to this. 为此。

@import '../../bulma/sass/utilities/_all.sass'

Note: I installed sass-loader and node-sass in vue-cli generated project. 注意:我在vue-cli生成的项目中安装了sass-loadernode-sass

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM