Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCSS file error: File to import not found or unreadable: bootstrap

I am trying to set up a site ran on Jekyll I haven't updated in awhile (obviously my developer skills are very rusty in general) with Github Pages. Whenever I try, I get this error: Your site is having problems building: Your SCSS file sass/about.scss has an error on line 1: File to import not found or unreadable: default. Load paths: _sass /hoosegow/.bundle/ruby/2.4.0/gems/minima-2.1.1/_sass. For more information, see https://help.github.com/articles/page-build-failed-invalid-sass-or-scss/.

All my scss pages like about.scss start with this:

---
---

@import "default";

or

---
---

@import "bootstrap";

I have made sure that my config.yml file has this:

sass:
  sass_dir: ./_sass

and I am not sure what to do from here.

like image 457
Aorio Avatar asked Mar 01 '18 05:03

Aorio


2 Answers

Looks like you're missing a pretty big hint!

File to import not found or unreadable: default

It's looking for a file called default.scss and is unable to do so. Make sure the file exists in the sass_dir you configured and doesn't have any weird read-permissions on it (e.g. can you open the file in another program?).

like image 106
Litty Avatar answered Oct 06 '22 13:10

Litty


I was able to fix this error by creating the imported stylesheets (eg. _scss/_default.scss) using cmd.

For example: NUL > _default.scss

Be careful not to overwrite any existing files.

like image 20
Kyle Avatar answered Oct 06 '22 12:10

Kyle