SCSS works well, yet Codekit error out "Syntax error: File to import not found or unreadable"

StackOverflow https://stackoverflow.com/questions/15999032

  •  03-04-2022
  •  | 
  •  

Question

1 The Problem:

I use sass (scss) + compass in my project.

At first, I just use command line to watch, i.e. "Compass watch" and everything works well.

Yesterday, I start to use Codekit to auto-compile all my files, with exactly the same style.scss file, it error out.

1.1 Some Detail:

I use compass to create image sprites, so in my .scss file I have two line:

@import "contact/*.png";
@include all-contact-sprites;

contact folder is where i put all the .png images, It works well with command line "compass watch", no error at all, yet when I use Codekit, it keep erroring out.

1.2 The error image:

"Syntax error: File to import not found or unreadable" enter image description here

P.S. As a newbie, I know it's my problem, and I know it's somekind a stupid question, but after hours searching, I still get nowhere, so I post this question.

Was it helpful?

Solution

It seems like CodeKit is trying to compile with SASS, while @import "contact/*.png" is a feature of Compass.

Make sure you point CodeKit at the root of your project where config.rb resides. Refer to CodeKit documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top