jeffreytse/jekyll-theme-yat

Error: Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72

Open

#177 aberto em 16 de dez. de 2024

Ver no GitHub
 (7 comments) (0 reactions) (1 assignee)HTML (700 forks)batch import
buggood first issue

Métricas do repositório

Stars
 (788 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Once I push my project and my project starts github actions, it faces this error below.

 Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
jekyll 3.10.0 | Error:  Invalid CSS after "  @if meta": expected "{", was ".function-exist..." on line 72
                    Invalid CSS after " @if meta": expected "{", was ".function-exist..." on line 72
/github/workspace/vendor/bundle/ruby/3.2.0/gems/jekyll-sass-converter-1.5.2/lib/jekyll/converters/scss.rb:123:in `rescue in convert': Invalid CSS after "  @if meta": expected "{", was ".function-exist..." on line 72 (Jekyll::Converters::Scss::SyntaxError)
        raise SyntaxError, "#{e} on line #{e.sass_line}"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I read the comment recommending upgrade of jekyll and tried it by adding gem "jekyll", "~> 4.3.4" and gem "jekyll-sass-converter", "~> 3.0.0" on Gemfile. But once I command bundle update jekyll jekyll-sass-converter on my local environment, it shows this error below.

Could not find compatible versions

Because github-pages < 9 depends on kramdown = 1.0.2
  and github-pages >= 9, < 14 depends on kramdown = 1.2.0,
  github-pages < 14 requires kramdown = 1.0.2 OR = 1.2.0.
And because github-pages >= 14, < 32 depends on kramdown = 1.3.1
  and jekyll >= 4.3.0 depends on kramdown >= 2.3.1, < 3.A,
  jekyll >= 4.3.0 is incompatible with github-pages < 32.
And because github-pages >= 117, < 178 depends on jekyll-sass-converter = 1.5.0
  and github-pages >= 39, < 117 depends on jekyll-sass-converter = 1.3.0,
  if jekyll >= 4.3.0 and github-pages < 32 OR >= 39, < 178 then jekyll-sass-converter = 1.3.0 OR = 1.5.0.
And because github-pages >= 22, < 39 depends on jekyll-sass-converter = 1.2.0
  and github-pages >= 178 depends on jekyll-sass-converter = 1.5.2,
  jekyll >= 4.3.0 requires jekyll-sass-converter = 1.2.0 OR = 1.3.0 OR = 1.5.0 OR = 1.5.2.
So, because Gemfile depends on jekyll ~> 4.3.4
  and Gemfile depends on jekyll-sass-converter ~> 3.0.0,
  version solving has failed.

It seems like the problem of Github pages dependency. This page shows the dependency versions Github Pages uses. How do we get to use jekyll version 4.x.x while the github pages dependency only supports jekyll version 3.10.0?

here is my actions log: build_and_deploy log

Guia do colaborador