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 CSS to Sass Installing Sass and Setting up the Project The --watch Command

Sean Flanagan
Sean Flanagan
33,235 Points

Problem with --watch command

Hi there.

I typed in the command sass --watch scss:css and got the error message No such file or directory.

What should I do?

Cheers

Sean

Hi again,

Make sure you have cd into your project folder directory (within the command line) before you run the command. In order for it to work, your project folder should have two folders inside: CSS and SCSS. Inside your SCSS folder you should have your SCSS file.

Is this your current setup?

Make sure to

cd documents/PROJECTFOLDER

Project folder structure should be as follows. Note SCSS and CSS folder are both at the same level, just within the project folder.

projectfolder/scss/style.scss
             /css
Sean Flanagan
Sean Flanagan
33,235 Points

Hi Kyle. Thanks for another quick response.

I've typed the full path:

cd Desktop/treehouse/css/css_to_sass/scss/style.scss

It now says The directory name is invalid.

2 Answers

Hi Sean,

Sorry you're having so much trouble. I am not able to replicate the issue.

Be sure to review your folder names and structures. I'm sorry to repeat myself, ensure you are in your folders directory within the terminal, just outside of where your scss folder and css folder lie (your scss and css folders should be at the SAME level not within one another). Make sure your folders are exactly named scss and css (case sensitive). The command itself is looking for folders called "scss" and "css".

You do not want to be in the SCSS folder, rather you want to be just outside of it, within the project folder. You want to be in

cd Desktop/treehouse/css/css_to_sass/

Then you want to run the command

sass --watch scss:css

Ensure you have a folder called CSS as well, as this is where the output will appear.

Sean Flanagan
Sean Flanagan
33,235 Points

Hello Kyle.

I did as you said and it's working now. I've upvoted all your posts and given you Best Answer for your superb help in both this thread and the previous one.

Thank you

Sean