简体   繁体   English

要导入的Sass文件未找到或不可读

[英]Sass File to import not found or unreadable

I have the following files: 我有以下文件:

app/assets/stylesheets/common/application.css.sass

the first line of this file is: 这个文件的第一行是:

@import common @import很常见

and the common file is on: 并且公共文件是:

app/assets/stylesheets/common.css.sass 应用程序/资产/样式表/ common.css.sass

But if a make a trace like this: 但如果像这样做一个跟踪:

sass --watch app/assets/stylesheets/common/application.css.sass --trace

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

error app/assets/stylesheets/common/application.css.sass (Line 1: File to import not found or unreadable: common. Load path: /repos/blabloo) 错误app / assets / stylesheets / common / application.css.sass(第1行:导入未找到或不可读的文件:常见。加载路径:/ repos / blabloo)

I tried to import the common file using "../common" and "/../common" 我尝试使用“../common”和“/../common”导入公共文件

but I still having the same problem. 但我仍然有同样的问题。

How can I solve this, because I can't upload the files to the production server and I guessing this is the cause. 我怎么能解决这个问题,因为我无法将文件上传到生产服务器,我猜这是原因。

Thanks in advance for your help. 在此先感谢您的帮助。

You have to add .css to the name of your file. 您必须将.css添加到文件的名称。

@import common.css

You can omit the .sass or .scss extension, but in the other cases, you must add the extension. 您可以省略.sass或.scss扩展名,但在其他情况下,您必须添加扩展名。

Regards. 问候。

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

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