Inconsident indentation with SCSS in webstorm file watcher - sass

I am using Webstorm file watcher to transpile my .scss file in to a .css file. Whenever the process runs, it gives me an error
error main.css (Line 37: Inconsistent indentation: 2 spaces were used for indentation, but the rest of the document was indented using 8 spaces.)
I have seen this happen to others through some google searching but none of their solutions seem to help me. And as far as I am aware, scss shouldn't complain about indentation.
Here are my file watcher settings

You probably solved it by now, but I recently had the same error (same line number and everything). To help others who run into the same problem.
your 'arguments' are wrong.
you are telling the compiler to compile the .css file (to nowhere).
change it into:
--no-cache --update $fileName$:$fileNameWithoutExtension$.css

Related

Weird syntax error with semicolon in SCSS and Intellij IDEA

I've tried to write SCSS in my Maven project with React in IDEA. I have sass and sass-loader in npm packages. But I always get a weird error:
Syntax error: missing semicolon
This is a very simple scss example for test. I can't use other tag selectors as well. I've added scss variable on the top to see if it causes an error but it doesn't and all the errors stop at tags. I think that means that scss file is readable after all. And everything is ok when using just css. What's going on?
I solved the problem. Maybe someday it would be useful for somebody.
The point is I missed restarting webpack when changing it. I found configs for sass-loader on its npm page and added it to my webpack.config.js and then run webpack --watch --progress. Everything finally worked

How can I solve Sass 'Error: expected more input'

I'm pretty new to Sass. I'm using version 1.13.0 on a Mac. I'm currently using SCSS on a major project for the first time and I've run into an error I've never seen before. I entered sass --watch style.scss style.css into Terminal, as I've done many times in this project without issue. Today however, when I saved my .scss file, Sass deleted my .css file and gave me the following error:
Error: expected more input.
^
style.scss 197:1 root stylesheet
Sass is watching for changes. Press Ctrl-C to stop.
Line 197 is the last line in my stylesheet.
Style.scss and style.css.map remain intact.
I've tried clearing Terminal, quitting and restarting Terminal, and using the standard sass style.scss style.css command but that also returned the same error.
Any help? Apologies if I'm leaving out any info. As I mentioned earlier, I'm very new to Sass so please let me know if there's anything else I can clarify.
It turns out my .scss file ended in a commend that I had forgotten to close off (I had forgotten to add the final slash in a /*comment*/). This was causing the error. Once I closed off the comment, everything went back to working properly.

sass not working. scss file changes are not applying to css

I have set up Sass and created a project it was worked nicely but after restarting my computer, Now if I change, add or remove anything from my style.scss file it does not affect the style.css Before restarting it was functional and worked nicely.
Are you using command line to watch your SaSS file and compile your CSS? If so you may want to run your “—watch” command again.

Compass + Dropbox = File to import not found or unreadable

I've got a funny error.
My sass files are located on a Dropbox folder. I edit them locally on my dev pc, and then they're synced via Dropbox to the server. On the server I have a CentOS installed with CLI Dropbox service.
I have an app.scss file and a _settings.scss file included from app.scss. If I edit _settings.scss, the following error is thrown:
error app.scss (Line 2: File to import not found or unreadable: settings.
Load paths:
/www/psmb.dev/web/typo3conf/ext/speciality/Resources/Public/foundation/sass
/usr/local/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/blueprint/stylesheets
/usr/local/lib/ruby/gems/1.9.1/gems/compass-0.12.2/frameworks/compass/stylesheets
/usr/local/lib/ruby/gems/1.9.1/gems/zurb-foundation-4.3.1/scss
Compass::SpriteImporter)
If I then change something in app.scss, it's compiled without error.
Now the funny thing: if I edit _settings.scss locally on the server, or via ssh, then no error is thrown!
What's up?
After some suggestion and Dmitri's test verification, we came to the conclusion that most likely compass watch caught the file change "too early" while dropbox process is in the midst of making complete sync of the file. The file sync is probably implemented by 2 or more successive file update steps.
Potentially the problem can be resolved if compass watch's compile trigger can be delayed somewhat. For now Dmitri decided to use ftpsync instead.
Make sure that you are using linux line endings in your SASS files, as that is probably making it fail to compile.
When you edit it in windows, it's probably setting it to the windows line ending.
When you then edit it in CentOS, it's probably settings them to the unix line ending.

"The system cannot find the path specified" when compiling SASS

I'm trying to learn SASS and so I have installed ruby through RubyInstaller and installed the sass gem.
I am able to type out my sass and have the compiler watch the file and write to another just fine, but every time I save my file I get
The system cannot find the path specified
C:\Program Files (x86)\Notepad++)
However everything works as intended, the styles are updated and compiled just fine, but it's quite annoying hitting ctrl+s and having that error keep popping up when it doesn't seem to be affecting anything.
How do I go about troubleshooting this?
Here is a solution for anyone else having the same trouble on notepad++:
Sass-Auto-Compile
For using the Sass-Auto-Compile plugin, you first need to install
another plugin called jN. jN is a plugin for Notepad++, which executes
your JavaScript-scripts in the Notepad++ environment, meaning you can
write plugins in JavaScript
this is the link :
http://www.ninjagame.de/blogContent/Sass-Auto-Compile.js
To get the auto-compiling working, you need to do two things:
Copy this script into the directory “Notepad++/plugins/jN/includes/” .
Now edit the script and change the variable pathToRubyBinDir to the
right value. Mine is: “C:/Program Files/Ruby193/bin/” .
OPTIONAL: There are two more configuration variables:
debugMode: can be true or false. In case of true, you will see the
command line, which calls the compiling process. You can see compiling
errors in this command line window.
outputStyle: this determines, how your .css is going to look like.
(compressed, extended…). See the comments above this variable for more
information.
This guide is copied and pasted from http://deekaysblog.wordpress.com

Resources