Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jekyll build error due to name conflict #146

Closed
evanwill opened this issue Dec 24, 2022 · 2 comments
Closed

Jekyll build error due to name conflict #146

evanwill opened this issue Dec 24, 2022 · 2 comments

Comments

@evanwill
Copy link

The recent v3.0.0 release causes some unexpected issues with many existing Jekyll projects because it causes a build failure when the root scss file has the same base name as one of the sass partials it imports.

For example:
a partial "_sass/_custom.scss" and a main css file "assets/css/custom.scss" that includes @import "custom"; .
With Ruby 3.1, Jekyll 4.3.1, and jekyll-sass-converter 3.0.0, results in fatal error, saying
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/custom.scss': expected "{".

Renaming one of the files solves the issue. Or adding to the Gemfile to use an older version, like gem "jekyll-sass-converter", "< 3.0".

This arrangement of files worked in previous versions of jekyll-sass-converter and the error message was a bit mysterious, so it took a while for me to debug older projects--I am not sure if this is something that should be fixed, but wanted to bring it up since I think others will be impacted.

@ntkme
Copy link
Contributor

ntkme commented Dec 24, 2022

@evanwill
Copy link
Author

Okay, Thank you!
I didn't understand that at first. I guess didn't really think of "custom.scss" and "_custom.scss" as the same filename, but they end up being the same in the generator's view of things.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants