Sass --watch keeps compiling the file - sass

I've been unable to find something similar to this on a Google search, but using VSCode and Dart Sass (now v 1.23.1) and running sass --watch css the file keeps on saving/compiling
There seemed to be no issue earlier today. However, the version I was running was 1.21. (I updated Sass to use the new module spec)
What is happening?
The file main.scss is saved
Terminal displays Compiled css/main.scss to css/main.css
It then loops, printing the following
Compiled css/main.css to css/main.css
Things I have tried
Uninstalled and reinstalled sass
deleted map files and related compiled files
Aprart from that, I am at a loss of what to try next. Has anyone experienced similar to this and what did they do to resolve it?

It seems this has been reported as a bug in the Dart-Sass repository and a pull request has been opened.

Related

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 source map issues on OS X Yosemite

I recently updated to OSX Yosemite and now, when I run Grunt and make changes to the sass file in my project, I receive the following error:
Warning: Error: Error generating source map: couldn't determine public URL for the source stylesheet.
No filename is available so there's nothing for the source map to link to.
on line of standard input
Use --trace for backtrace. Use --force to continue.
I have made no other changes to my Grunt setup or sass:dist, dependencies are unchanged and so forth. Any help resolving this would be greatly appreciated. Thanks!
This issue can have more than one reason, maybe this will help you.
Before starting remove the compiled css!
Update grunt-contrib-sass to the latest version
Sourcemap Requires Sass 3.4.0, which can be installed with gem install sass
Run grunt sass task and review compiled css.
When everything is updated, the sourcemap should be automatically created and available. Be sure to empty browser cache before testing in the browser.

LiveReload LoadError lib/compass/bin/compass

Haven't had any trouble with LiveReload until last week, when I must've done something that messed up a path.
Whenever I save a SASS file, I get the following error:
/usr/bin/ruby: No such file or directory -- /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/lib/compass/bin/compass (LoadError)
Indeed, the lib directory doesn't even exist. The correct location for compass is in /Applications/LiveReload.app/Contents/Resources/SASS.lrplugin/gem/bin/compass
How can I redirect LiveReload to look there? Or better question, what might I have done to mess this up? gem list shows up-to-date SASS and compass, and I don't think it's a $PATH problem. I've been using grunt in the meantime, but the LiveReload GUI is less of a hassle. Even suggestions for where to start with this bug would be helpful, as I'm at a loss.
I've had the same problem. I upgraded to the latest beta (v2.3.64) and that seems to work.
http://feedback.livereload.com/knowledgebase/articles/67441-how-do-i-start-using-livereload-
I does appear to be a bug in the latest version of LiveReload 2.3.62. I restored version 2.3.27 from a backup and that works for me.

#import "breakpoint"; throws not found error

I was working on this project yesterday using Sass and Breakpoint and everything was fine. This morning however when I went to compile using sass --watch .. I am getting this error:
error ../sass/screen.scss (Line 6: File to import not found or unreadable: breakpoint.
Load path: /Users/MOD3/Sites/GABE/stylesheets/stylesheets)
I am not sure why it is not finding breakpoint anymore but I am sure it is installed. I read something about it needing to be an absolute path, but where do I get that path from? Any idea how to fix this? It was working yesterday...
Breakpoint currently does not work with vanilla Sass as it requires a small bit of Ruby that is not available until Sass 3.3. My intuition is that you probably ran sass --compass --watch to allow Breakpoint to run through Compass. If not, I would highly encourage you to compile through Compass or Breakpoint will not work as expected.
UPDATE:
Issue was solved by running compass watch from same folder as config.rb.

How can I run SASS without installing?

I wanted to use SASS on our company's web app but I can't install any programs on production machines. Everything I searched about SASS required you to run an installation program like gem and also required HAML.
I was hoping to find just a script that processes scss files without needing to install anything else.
Well... if you have Ruby available, you could checkout the Git repository of Sass (https://github.com/nex3/sass). Do so by either typing git clone https://github.com/nex3/sass.git or just downloading it.
Then you could use the interactive Ruby console by typing irb. Try to require 'sass/lib/sass' (this one here) and run Sass.compile_file 'my_styles.css'.
Otherwise... why are you trying to do that? You can also install sass locally, run sass --watch on your sass folder and it compiles your scss files automatically into css files - which you can deploy on your production environment.
If you can run java program in your build system, you could use JRuby for compiling sass. See this answer for more details
Here's a solution for using Sass without using the command line or installing dependencies. It works with Windows, OS X, and Linux. It has a graphical interface, and no installer, just unzip and double-click.
http://scout-app.io
You can also use the java library https://github.com/scireum/server-sass which can be embedded into any java based web-app. It will compile sass on the fly and return the resulting css. This is especially useful if the Sass sources change (i.e. for customizing reasons) and an ahead of time compilation is not possible. (Note: I'm the author of the project - and it is also not yet a complete implementation of the Sass standard).
Alternatively, what you could do is:
Install Ruby
Download the Sass Gem
Navigate to download location
Run: gem install sass-3.3.4.gem
Voila! Sass is installed.
Use the online Sass compiler SassMeister. You just have to paste your sass code on the left panel and get the css code on the right.

Resources