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 Refactoring with Sass Breaking the Style Sheet into Partials

Jason Brown
Jason Brown
9,626 Points

"sass --watch scss:css" command not working with current project folder, but was with a folder from stage 1.

In the first stage I set up the lake-tahoe website with the "sass --watch scss:css" command and had no problems. When I got to this video, I saw a lot of changes were made behind the scenes. So I deleted the file on my desktop and replaced it with the current project folder and tried to rerun the console by starting over with "cd desktop" then cd desktop/lake-tahoe to make sure I was covering my steps. When I ran "sass --watch scss:css" with the new folder I get this message:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory

Sass is watching for changes. Press Ctrl-C to stop. Errno::ENOENT: No such file or directory - getcwd Use --trace for backtrace.

Is this an actual error or is it still watching for changes? Was my step to rerun the watch command for the new folder unnecessary?

1 Answer

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 Points

You must be in the wrong directory. The command you typed is correct but you need to be in the directory that contains the scss and css directories for it to work. You can check using ls to list the contents of the directory.

Here's an example below:

  • I try the sass --watch command, it gives me that error that you had
  • I stop the program, and run ls to list the files in my directory. There is a css directory, but there's this other directory called workspace which is where I really want to be
  • I changed directories into workspace, and run ls again. I see css and scss directories
  • I run the sass --watch command again and this time there's no error
treehouse:~$ sass --watch scss:css                                                                  
>>> Sass is watching for changes. Press Ctrl-C to stop.                                             
      error No such file or directory @ rb_sysopen - scss                                           
^Ctreehouse:~$ ls                                                                                   
css  workspace                                                                                      
treehouse:~$ cd workspace/                                                                          
treehouse:~/workspace$ ls                                                                           
css  fonts  img  index.html  scss                                                                   
treehouse:~/workspace$ sass --watch scss:css                                                        
>>> Sass is watching for changes. Press Ctrl-C to stop.  
Sam Gord
Sam Gord
14,084 Points

thank you so much