Why can't dart-sass read the directory where output file should be created?

Viewed 298

I am having trouble getting dart-sass to watch an SCSS file for changes and then generate a CSS file. My input file is in my project's static directory:

/srv/https/html/repo/static/scss/styles.scss

I want the output file to be created and written here:

/var/www/html/styles.css

I'm using the latest version of dart-sass for Linux and running this command from the repos directory:

sass --watch static/scss:/var/www/html

The command produces this error:

Error reading ../../../../var/www/html: Creation failed.

If I add the full path to the input file and the relative path to the output file like the following, I get the same error:

sass --watch /srv/https/html/repo/static/scss:../../../../var/www/html

Now I should add that the destination directory /var/www/html is cross-mounted via NFS. At first I thought it was a permissions problem because the directory had permissions 755 as did the existing styles.css file which I had created before using Sass. But I get the error even if I change the permissions on the parent directory and CSS file to 777. Does dart-sass not work with NFS file systems or do I need to run the command a different way? I should add that if I just run the sass command with --watch and specify the paths to the input and output files, sass compiles without an error.

0 Answers
Related