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
Please sign in to leave a comment.
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?
Oh wow.
"error No such file or directory @ rb_sysopen - style.SCSS"
please make sure to cd to a directory where your style.SCSS lives.
Oh sorry. This was the result:
error style.SCSS (Line 2: Invalid @import: expected end of line, was ";".)
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
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?
>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:)