Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with SASS build #39

Open
katyaugust28 opened this issue May 10, 2021 · 1 comment
Open

Error with SASS build #39

katyaugust28 opened this issue May 10, 2021 · 1 comment

Comments

@katyaugust28
Copy link

The following was printed at the bottom of the screen:

[Errno 2] No such file or directory: 'sass'
[cmd: ['sass', '--update', '/Users/katyaugust/Desktop/Portfolio/scss/styling.scss:/Users/katyaugust/Desktop/Portfolio/scss/styling.css', '--stop-on-error', '--no-cache']]
[dir: /Users/katyaugust/Desktop/Portfolio/scss]
[path: /usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

@wi0lono
Copy link

wi0lono commented Jun 9, 2021

Edit: Before trying this, make sure you have installed Sass, and that it's accessible from the command line. If not, ignore everything below and make sure it's visible from there.

TLDR: This package was made for Ruby Sass which not supported anymore, so you'll have to copy the source into your own build-system and remove the --no-cache option from the sublime-build file.

Step-By-Step Solution

I know this is a bit late, but I've just spent four soul-crushing hours figuring out the solution to this really easy problem, and I don't want anyone else to go through the same thing.

The problem

If you're facing this problem, you've installed Dart Sass, which is a good thing. Ruby Sass isn't supported anymore. Unfortunately, this package doesn't directly work with Dart Sass.

Basically, this package contains sublime-build files, which contain executable commands to convert sass to css. Ruby Sass had a command line option called --no-cache which is hard coded into this package's compilation commands. Long story short, Dash Sass doesn't support this flag, so we have to remove it.

How to solve it

Basically, you'll have to make your own build file without the --nocache flag. This is easy.

  1. In Sublime, go to Tools -> Build System -> New Build System. This should create a new file called untitled.sublime-build, with some default code. Delete it.
  2. Go to this repository's SASS.sublime-build file and copy all of its contents.
  3. Paste it into your file.
  4. Remove the , "--no-cache" bit. It's at the end of the line starting with "cmd", it should be easy to spot.
  5. Save your file as SASS.sublime-build in the default location suggested.

That's it. You're all good to go. Use Ctrl + B to build.

You should be able to follow the exact same process for the SASS - Compressed.sublime-build file if you want compressed css output, but if you don't know what compressed css is, you probably don't need it.

PS: Consider installing this package, which builds your css file automatically every time you save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants