Zola: Error: Can't watch `sass` for changes in folder. Do you have correct permissions?

Created on 15 Sep 2020  ·  7Comments  ·  Source: getzola/zola

Bug Report

Environment

Zola version: v0.12.0
OS: Linux (Ubuntu 20.04.1 LTS, Linux 5.6.16)

Expected Behavior

I want to serve a local instance with this command:

zola serve

Current Behavior

When invoking the command, a sass error comes up:

zola serve

Error: Can't watch `sass` for changes in folder `/home/timvisee/git/timvisee.com`. Do you have correct permissions?
Reason: entity not found

Step to reproduce

You may reproduce this by trying the serve command on this version of my personal website.

git clone https://gitlab.com/timvisee/timvisee.com.git
cd timvisee.com

git checkout 328ff3e819b45eb568f4cfb6860900c543b3636d

zola serve

Additional notes

  • This was introduced in v0.12.0, v0.11.0 is fine.
  • The error shows 'sass' changes in the root directory. While the sass directory is at ./themes/zenn/sass.
bug

All 7 comments

The same happens on the latest next branch (70c23bd84bf11e09c2a19a6891bedf8366b481ea).

Looks like it errors when the sass folder is not present now, should be an easy fix

You're right. Creating /sass makes it succeed.

May I give patching this a try, or are you already on it?

I did some investigation.

It seems it now requires a /sass directory when compile_sass = true in the site configuration (because of this line, since b003a47d549c92a7210965df8095e1a6dc4b32db).

Now, removing this configuration property from my configuration (having the error) also removes the error. Styles still seem to be rendered correctly, even though I'm using sass styles in the theme (./theme/zenn/sass).

This makes me wonder:

  • Is the compile_sass option just to compile sass styles in /sass?
  • Are sass styles in a theme directory always compiled, ignoring the compile_sass option?
  • Should any sass styles compile when compile_sass is unset?

The config.toml documentation shows this for compile_sass:

When set to "true", the Sass files in the sass directory are compiled.

I'm assuming this is just for sass styles in /sass.

Because, if this option is just to compile sass included in the root directory, then I'd consider this error desired behavior. Yes, the shown error could be better though.

That's a good point, I forgot the themes.
I think it makes sense for compile_sass to be implicit for themes and have compile_sass in your own config.toml be only for the root site.
+1 on not even trying to watch the folder and update the docs

I'll leave it as is, and will update the documentation then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svenstaro picture svenstaro  ·  5Comments

nikhiljha picture nikhiljha  ·  5Comments

jjbarr picture jjbarr  ·  5Comments

pandark picture pandark  ·  3Comments

RealOrangeOne picture RealOrangeOne  ·  6Comments