Conversion error: Jekyll::Converters::Scss encountered an error
Asked Answered
B

6

8

I downloaded the new material bootstrap css and wanted to use it in my jekyll blog. After setting up and running the jekyll serve -w to compile the site locally, the console returned this error

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/main.scss': Invalid CSS after "...x-highlighting"": expected selector or at-rule, was ""bootstrap"" on line 49

After searching for a while, it seems as if I am the only one facing this issue. What am I doing wrong?

Banderole answered 25/12, 2014 at 19:0 Comment(3)
This can be interesting to see you code. If not all from a github repository, at least the css/main.scss.Prepossession
There is, actually bootstrap-sass that you can customize and recompile on-the-fly with Jekyll's Sass converter. It's of no relevance to this problem, but give it a try.Mooneye
I wanted to use the paper (material design) theme from bootswatch.com/paper/Banderole
B
6

Turns out this was caused by an omitted comma after one of my import statements

@import
    "base",
    "layout",
    "syntax-highlighting",
    "bootstrap";

Hope this saves someone else some time.

Banderole answered 25/12, 2014 at 19:4 Comment(1)
9 years later, this is still relevant, heh (just spent 20 minutes trying to find that missing semicolon...)Again
C
6

In github Pages, set main folder to /(root), not docs. Hope it works

Caliche answered 23/9, 2022 at 7:18 Comment(3)
How to do that?Wolenik
Big thanks for this, was confused as to what my mistake was!Donte
Thanks! It has worked on my Angular projectNovercal
R
2

You can also check if you're starting the server in the right directory, in my case, I spend 1 hour trying to start the server in the wrong directory :(

Ruthven answered 28/5, 2016 at 19:32 Comment(1)
Had the same issue, turns out I mapped the start in a 'docs' folder which didn't exist. Dropping my index.html and .css file in a 'docs' folder solved my problem. Thanks!Haven
T
2

setting main folder to /(root) worked for my own problem

Thornie answered 12/3, 2023 at 15:26 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Wallpaper
M
0

This error is usually thrown when there is a typo or malformed CSS string in one of the *.sass files.

The error returned during the build is pointing to the issue. Just have in mind that the given line in the error is the one in bundled output css file: _site/css/main.css.

Using --trace might help further investigate in some cases. i.e.:
bundle exec jekyll build --trace

Mountfort answered 15/12, 2018 at 8:52 Comment(0)
S
0

You can trace same problem in your local pc as below

bundle exec jekyll build --trace

then fix problem and push

Setiform answered 4/8, 2023 at 12:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.