Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Laura Hill
Laura Hill
13,674 Points

sass "No such file"

Cant get the terminal / console to pull the test.scss file. Its on the desktop.

Here is what I get;

Successfully installed sass-3.4.6

Parsing documentation for sass-3.4.6

1 gem installed

laurahillsmbp2:~ laurahill$ sass test.scss

Errno::ENOENT: No such file or directory - test.scss

Use --trace for backtrace.

laurahillsmbp2:~ laurahill$

4 Answers

Thomas Leenders
Thomas Leenders
5,468 Points

Well looks like it's reading and writing a file out! It looks like there is an error in your css because of this line:

error ./Website10/css/test.scss (Line 1: Invalid CSS after "test.scss": expected "{", was "")

That error is saying that somewhere in the test.scss file, it expected to see a closing bracket. It's likely you opened one somewhere, but forgot to close it.

If you're not too familiar with the command line, and only just getting into sass, I would recommend using codekit https://incident57.com/codekit/. Its easy to get started if you're new to this kind of thing, and is pretty cheap.

Thomas Leenders
Thomas Leenders
5,468 Points

Are you in the correct directory using the terminal (I am assuming you are on a mac)? It looks like you are in your home directory, and since there is no test.scss file there, you get an error!

To go to your desktop in terminal, you can use the "Change directory" command: cd. For example, in your terminal window, run this:

cd ~/Desktop/

~/ refers to to the home directory of your computers account. If you want to see what directory you are currently in, run:

pwd

Also, just note that dumping and running code on your desktop is probably a bad idea, since you may put other files/other code there which could cause all sorts of problems in the future. Instead, I like to have a folder I call "working_copies" on desktop my which stores all my project files (each project has a separate folder).

Laura Hill
Laura Hill
13,674 Points

Hi! Thank you!! running the change directory helped! definite progress!! however the terminal window does not output the CSS i enter into the text file. My text file just has a simple line of CSS ,{ paragraph blue). No matter what I enter into my text file, the terminal only says "change detected". Here is what the terminal window says:

Parsing documentation for sass-3.4.6 1 gem installed

laurahillsmbp2:~ laurahill$ sass --version

Sass 3.4.6 (Selective Steve)

laurahillsmbp2:~ laurahill$ pwd

/Users/laurahill

laurahillsmbp2:~ laurahill$ cd ~/Desktop/

laurahillsmbp2:Desktop laurahill$ sass test.scss

laurahillsmbp2:Desktop laurahill$ sass --watch .

Sass is watching for changes. Press Ctrl-C to stop.

  error ./Website10/css/test.scss (Line 1: Invalid CSS after "test.scss": expected "{", was "")

  write ./test.css

  write ./test.css.map

[Listen warning]:

Listen will be polling for changes. Learn more at https://github.com/guard/listen#polling-fallback.

Deleted template detected: Website10/css/test.scss

Change detected to: test.scss

  write ./test.css

  write ./test.css.map

sass --watch .

Change detected to: test.scss

  write ./test.css

  write ./test.css.map

Change detected to: test.scss

  write ./test.css

  write ./test.css.map

Change detected to: test.scss

  write ./test.css

  write ./test.css.map

Change detected to: test.scss

  write ./test.css

  write ./test.css.map

Change detected to: test.scss

  write ./test.css

  write ./test.css.map
Laura Hill
Laura Hill
13,674 Points

Thank you - I started the console course here and that started correcting some problems right away - I am not sure why sass is creating map files instead of just a duplicate of the file I have asked it to "watch" I am off to solve that problem. Thank you very much for the answers and Ill try code kit if it continues to be this bumpy:))

Thomas Leenders
Thomas Leenders
5,468 Points

No worries, happy coding!