Search code examples
tailwind-cssjekyllgithub-pagespostcss

Conversion error: Jekyll::Converters::PostCss encountered an error while converting 'assets/css/main.css'


I'm following these tutorials to host a jekyll site on github pages

Jekyll & Tailwind Boilerplate https://github.com/mzrnsh/jekyllwind

Deploy to github pages https://jekyll.ohsostatic.com/devops/how-to-use-tailwind-css-with-jekyll-on-github-pages

When I commit to my main branch to trigger the build, it throws this error on the jekyll build step

 Conversion error: Jekyll::Converters::PostCss encountered an error while converting 'assets/css/main.css': 859: unexpected token at '🌼 daisyUI 3.2.1 https://daisyui.com…

I'm not really sure what's going on, there's no custom CSS in the entire project, it's build on tailwind classes. I did install @tailwindcss/typography and DaisyUI as plugins, but otherwise there's nothing in the project that wasn't included from the tutorials.


Solution

  • It seems the way jekyll-postcss works leverages an old Jekyll Converter gem that doesn't work on some machines.

    Check out this blog post for installing an alternative, jekyll-postcss-v2. This blog discusses its use and why it is necessary.

    My guess is that the build image your Github Action is using from the tutorial you've posted is using newer dependencies than what you're running locally.