Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Help please

73 views
Skip to first unread message

Alessandro

unread,
Apr 25, 2024, 7:06:51 AM4/25/24
to nanoc
No dev guru here.
Windows 10 / Ruby 3.2.3 / Nanoc 4.12.20

On rake check I get this error:

Sass::SyntaxError: File to import not found or unreadable: components/font_general.
Load path: Nanoc Sass Importer

I checked the components folder and the file _font_general.scss exists.
No apparent syntax error inside of it.

What's wrong? Any suggestions on how to fix this?

Thanks for your help.

Denis Defreyne

unread,
Apr 26, 2024, 2:15:36 PM4/26/24
to na...@googlegroups.com
Hey Alessandro,

Also, I recommend using the newer :dart_sass filter; the :sass filter using the Ruby implementation which has been end of life since early 2019. With this filter, the code you provided should work well.

If you want to stick to the old :sass filter anyway, the import path likely needs to be components/font_general.* instead (with the .* so that Nanoc knows how to find it).

I hope this helps!

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Message has been deleted
Message has been deleted

Alessandro

unread,
Apr 29, 2024, 6:33:44 AM4/29/24
to nanoc
Thank you Denis.
I firstly tried to keep the :sass filter and changed the import path according to your suggestion (.*), but unfortunately to no avail. The error persists.
I then installed dart_sass gem. Now the problem is how to change the compile rule in Rules.rb
Currently it's like this => see attached image
Any hint?
Thanks.

snippet.png

Alessandro

unread,
May 2, 2024, 6:57:39 AM5/2/24
to nanoc
Ok I changed the compile rule in Rules.rb and it seems to work.

On rake check though now I get this error:

Sass::CompileError: C:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/nanoc-dart-sass-1.0.3/lib/nanoc/dart_sass/filter.rb:74:in `find_item_for_url': Could not find an item matching pattern `C:/assets/stylesheets/components/font_general` (RuntimeError)

The actual path of _font_general.scss is C:/Users/x86/Documenti/SSSNanoc/ssstatic/content/assets/stylesheets/components/font_general so it seems there is something wrong in how filter.rb builds the url.

Any suggestion on how to fix this?

Thanks.

jmf...@gmail.com

unread,
May 6, 2024, 6:33:24 PM5/6/24
to nanoc
For reference: This seems to be a bug in the dart-filter, I filed a bug report here https://github.com/nanoc/nanoc/issues/1703
Reply all
Reply to author
Forward
0 new messages