GianArb
GianArb

Reputation: 1674

Jekyll site fails only when pushed to GitHub

I am developing a new version of a static website with Jekyll that deployed via Github pages: https://devcampy.com

The repository: https://github.com/gianarb/devcampy.com

Locally I run it with docker, and I am not able to reproduce the issue:

$ docker run --rm -p 4000:4000 -v "$PWD":/srv/jekyll jekyll/jekyll:stable jekyll serve

This is the error I get via email when I push to the repository. I can't figure out why it does not work properly

The page build failed for the `master` branch with the following error:

Your SCSS file `assets/main.scss` has an error on line 6: File to import not found or unreadable: vendor/rfs. Load paths: node_modules /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass /hoosegow/.bundle/ruby/2.5.0/gems/jekyll-theme-primer-0.5.3/_sass. For more information, see https://help.github.com/en/articles/page-build-failed-invalid-sass-or-scss.

Does somebody have any feedback? Thanks a lot

Upvotes: 6

Views: 1305

Answers (2)

David Jacquel
David Jacquel

Reputation: 52779

Your current bootstrap code is incomplete. /node_modules/bootstrap/scss/vendor/_rfs.scss is missing because of a .gitignore rule that prevent any vendor folder to be versioned.

  1. In your .gitignore, replace vendor line by vendor/bundle

  2. run npm install bootstrap to override current version

Upvotes: 11

lacostenycoder
lacostenycoder

Reputation: 11186

The error is telling what the problem is. You have this on the line in main.scss

@import "bootstrap/scss/bootstrap";

So this means the file may exist locally but is not able to import on your deploy since it's not there.

Looking at your repo I see you have bootstrap located here:

node_modules/bootstrap/dist/css/bootstrap.min.css

So try this instead:

@import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
// or you could try
@import "../node_modules/bootstrap/scss/bootstrap.scss"

I would think one of those should work.

Upvotes: 0

Related Questions