SCSS interpreter bugged

I'm getting this error on my import:

@import "_partials/mixins";

Output: 

/usr/local/bin/scss --no-cache --update style.SCSS:style.css
error style.SCSS (Line 2: Invalid @import: expected end of line, was ";".)

Process finished with exit code 1

  • If I remove the semicolon then I get an error marker saying that the semicolon is expected.
  • Scope: Project Files
  • The path to my program in file watcher settings is /usr/local/bin/scss
  • Not tracking root files only
  • Arguments: --no-cache --update $FileName$:$FileNameWithoutExtension$.css
  • Output paths to refresh: $FileNameWithoutExtension$.css:$FileNameWithoutExtension$.css.map
  • Auto-save is checked
  • Trigger the watcher on external changes is checked

 

 

7 comments

Something must be wrong with your .scss file. What is the result of running /usr/local/bin/scss --no-cache --update style.SCSS:style.css in your system terminal?

2

Oh wow. 

"error No such file or directory @ rb_sysopen - style.SCSS"

0

please make sure to cd to a directory where your style.SCSS lives.

0

Oh sorry. This was the result:

error style.SCSS (Line 2: Invalid @import: expected end of line, was ";".)

0

Please change file extension from .SCSS to .scss (lower case). Sass compiler determines the file type by extension - files with "scss" extension are parsed as SCSS, others seem to be treated as Sass. So the compiler expects to see Sass syntax, and fails on semicolons

1

YES. That finally fixed it. I was going out of my mind. I didn't know the capitalization would matter. I should note that when I right-clicked in the filetree and selected New > SCSS the file is automatically give the all caps file extension. Maybe that be changed if your native scss compiler expects to see a lowercase file extension?

0

>I should note that when I right-clicked in the filetree and selected New > SCSS the file is automatically give the all caps file extension

You must have a custom file template for SCSS file creation... The predefined one (available via File | New | Stylesheet, SCSS) creates extension with lower case. Please check Settings | Editor | File and Code Templates - what does the SCSS template look like? Please attach a screenshot of this page

>Maybe that be changed if your native scss compiler expects to see a lowercase file extension?

Just a note: this is not _our_ compiler, this is usr/local/bin/scss that we neither bundle nor maintain:)

1

Please sign in to leave a comment.