简体   繁体   English

语法错误:找不到导入文件或不可读:指南针/ css3

[英]Syntax error: File to import not found or unreadable: compass/css3

I already have a config.rb in the root with the following: 我已经在根目录中有以下内容的config.rb

# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "js"

# generated_images_dir = "/images/"
http_generated_images_path = "../images"

I'm using Gruntfile.js and I made it work to compile but I get this error once file is compiled: 我正在使用Gruntfile.js并使其可以编译,但是一旦编译文件,我会收到此错误:

Running "sass:dist" (sass) task
Syntax error: File to import not found or unreadable: compass/css3.
              Load paths:
                /Users/DanielRamirez/Sites/020
                /Users/DanielRamirez/Sites/020/sass
        on line 86 of sass/_base.scss
        from line 7 of sass/style.scss
  Use --trace for backtrace.

I recently had to restore my hard drive so maybe some things are missing. 我最近不得不还原我的硬盘驱动器,所以也许有些东西丢失了。 I reinstalled compass using: 我使用以下方法重新安装了指南针:

gem install compass

I have a macbook so I do not need to install ruby as it comes in the package if I understand well. 我有一台Macbook,因此如果我了解得很好,则无需安装软件包中随附的ruby。

What do I have to do to make this work? 我必须做些什么才能使这项工作?

This looks like you try to compile your styles by sass task (sass:dist), but use compass mixin as well. 看起来您尝试通过sass任务(sass:dist)来编译样式,但是也要使用罗盘mixin。

What kind of sass compiler do you use? 您使用哪种sass编译器?

There is a good decision. 有一个很好的决定。 You should try to switch to the grunt-contrib-sass ( https://npmjs.org/package/grunt-contrib-sass ), that have internal support for compass.( set options compass:true) 您应该尝试切换到内部具有罗盘支持的grunt-contrib-sass( https://npmjs.org/package/grunt-contrib-sass )(设置选项罗盘:true)

Recently had the same issue when I moved to a file structure for my SASS (partials/_name.scss) and then moved my site to a DEVELOPMENT environment. 最近,当我移至我的SASS的文件结构(partials / _name.scss),然后将我的站点移至DEVELOPMENT环境时,遇到了同样的问题。 Error went away after I opened the files, made a small change (space bar) and saved. 打开文件,进行小更改(空格键)并保存后,错误消失了。 I am sure there is a more elegant way but this allowed me to move on. 我敢肯定有一种更优雅的方法,但是这让我继续前进。

With the current version of " grunt-contrib-sass " you have to set compass option to true in your sass task ie: 使用当前版本的“ grunt-contrib-sass”,您必须在sass任务中将罗盘选项设置为true,即:

 sass: {
        dis: {
            options: {
                style: 'compressed',
                compass: true
            },
            files: {
                'stylesheets/screen.css' : 'sass/screen.scss'
            }
      }
    },

Check Documantion 检查文件

暂无
暂无

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

相关问题 错误:要导入的文件未找到或不可读:指南针。 在轨道3.1 - Error: File to import not found or unreadable: compass. in rails 3.1 Sass::SyntaxError:未找到要导入的文件或无法读取:生产中的指南针 - Sass::SyntaxError: File to import not found or unreadable: compass in production 未找到Susy2文件或无法读取的Susy2文件,通过Gulp与Compass一起编译 - Susy2 File to Import not found or unreadable, compiling with Compass via Gulp 找不到导入文件或无法读取文件:指南针手表无法运行 - File to import not found or unreadable: compass watch cant run 找不到导入文件或文件不可读:引导程序错误行#5 - File to import not found or unreadable: bootstrap error line #5 错误:未找到或无法读取要导入的文件:bootstrap-email - Error: File to import not found or unreadable: bootstrap-email Sass :: SyntaxError:在Rails 3中找不到要导入的文件或不可读的文件 - Sass::SyntaxError: File to import not found or unreadable In Rails 3 Jekyll“服务”命令错误:导入未找到或不可读的文件:base。 加载路径:在第46行 - Jekyll “serve” command error: File to import not found or unreadable: base. Load paths: on line 46 错误:要导入的文件未找到或不可读:mycustom.scss。 running:rake assets:precompile - Error: File to import not found or unreadable: mycustom.scss. running: rake assets:precompile 找不到导入的Sass文件或文件不可读,文件确实存在 - Sass file to import not found or unreadable, file does exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM