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

Sass Compilation Error in GitLab CI Pipeline #94

Open
damc opened this issue Jun 22, 2023 · 2 comments
Open

Sass Compilation Error in GitLab CI Pipeline #94

damc opened this issue Jun 22, 2023 · 2 comments

Comments

@damc
Copy link

damc commented Jun 22, 2023

Hello,

I'm trying to use your Jekyll theme for my GitLab Pages site, but I'm encountering an issue when GitLab CI tries to build the site. The error occurs during the Sass compilation step and seems to be related to the use of Liquid syntax in the index.sass file.

Here's the error message I'm seeing:

Error: Expected newline.
  ╷
8padding: 1.75em calc(40% - 17em)
  │                                     ^
  ╵
  /builds/myusername/myproject/assets/css/index.sass 8:37  @import
  /builds/myusername/myproject/assets/css/frame.sass 1:9   root stylesheet 
  Conversion error: Jekyll::Converters::Sass encountered an error while converting 'assets/css/frame.sass':
                    Expected newline.

The issue seems to be that the Sass compiler is trying to process the file before the Liquid processing happens. This is unusual, as Jekyll should be processing the Liquid tags before the Sass compiler runs.

I'm using Ruby version 3.0.2 and Jekyll version 4.3.2. The issue occurs in a GitLab CI pipeline using the ruby:3.0.2 Docker image.

I've tried updating all my gems to their latest versions and checked my Jekyll configuration, but the issue persists. I'm not using any Sass plugins.

Any help would be greatly appreciated.

Thank you!

@averagechive
Copy link

@damc on the README.md of jekyll-sass-converter there is the following:

Dropped support of importing files with the same filename as their parent file

In v2.x, the Converter allowed imports of files with the same filename as their parent file from sass_dir or load_paths. This is a side effect of a bug in the Converter, which will remain as is in v2.x due to its usage in the wild.

In v3.x, imports using the same filename of parent file will create a circular import. To fix these imports, rename either of the files, or use complete relative path from the parent file.

For me renaming assets\css\index.sass to assets\css\index2.sass resolved the issue.

@ahmeturganci
Copy link

i had a similar problem and after clone the project
bundle install
After solving the related problem in my local project i run the
bundle exec jekyll build --trace

I did not experience the problem again on the cli side.

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

No branches or pull requests

3 participants