Reputation: 27
I've just created a new Jekyll site, which I am building locally (Linux Mint 20.2) and then uploading _site via ftp to my server. I don't know what it is about my setup, but I always have problems building/serving Jekyll locally, that always seem to depend on various versioning and/or syntax issues. This is my latest...
When I build or serve I get an error seemingly generated by sass/css/scss compilation, which ends the process with:
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> @import "reset";
^
Where the error is: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
I have read about similar issues, where they suggested removing the two lines of ---
at the start of style.scc OR removing the semi-colons in those first two import lines.
My style.scss starts ... and ends as follows:
---
---
//
// IMPORTS
//
@import "reset";
@import "variables";
// Syntax highlighting @import is at the bottom of this file
/**************/
/* BASE RULES */
/**************/
html {
font-size: 100%;
}
body {
background: $white;
font: 18px/1.4 $helvetica;
color: $darkGray;
}
etc ...
footer {
padding: 20px 0;
text-align: center;
}
// Settled on moving the import of syntax highlighting to the bottom of the CSS
// ... Otherwise it really bloats up the top of the CSS file and makes it difficult to find the start
@import "highlights";
@import "svg-icons";
Funnily enough, when I tried removing the two lines of ---
yesterday this did actually work (!), but then today (after reboot overnight) I tried to build/serve the same site and got an error that style.css didn't exist (i.e. my site built but not styles, just content).
So I put those two lines of ---
back in, and I am back to the original error: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
So, what is going on and why won't my site build?
I am pasting the full output from the failed build (fails the same for serve):
john@mint:~/site/myjekyllsite$ jekyll build
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.3.20). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.20`.
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The dependency http_parser.rb (~> 0.6.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Configuration file: /home/john/site/myjekyllsite/_config.yml
Source: /home/john/site/myjekyllsite
Destination: /home/john/site/myjekyllsite/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'style.scss':
Error: File to import not found or unreadable: reset. on line 5:1 of style.scss >> @import "reset"; ^
------------------------------------------------
Jekyll 4.2.2 Please append `--trace` to the `build` command
for any additional information or backtrace.
------------------------------------------------
Traceback (most recent call last):
30: from /home/john/gems/bin/jekyll:23:in `<main>'
29: from /home/john/gems/bin/jekyll:23:in `load'
28: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
27: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
22: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
3: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:195:in `sass_convert'
1: from /var/lib/gems/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
style.scss:5: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
on line 5:1 of style.scss
>> @import "reset";
^
29: from /home/john/gems/bin/jekyll:23:in `<main>'
28: from /home/john/gems/bin/jekyll:23:in `load'
27: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
22: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
3: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
1: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:192:in `sass_convert'
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> @import "reset";
^
And with --trace
john@mint:~/site/myjekyllsite$ jekyll build --trace
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.3.20). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.20`.
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
The dependency http_parser.rb (~> 0.6.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby, x86_64-linux but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Configuration file: /home/john/site/myjekyllsite/_config.yml
Source: /home/john/site/myjekyllsite
Destination: /home/john/site/myjekyllsite/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'style.scss':
Error: File to import not found or unreadable: reset. on line 5:1 of style.scss >> @import "reset"; ^
Traceback (most recent call last):
30: from /home/john/gems/bin/jekyll:23:in `<main>'
29: from /home/john/gems/bin/jekyll:23:in `load'
28: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
27: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
22: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
3: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:195:in `sass_convert'
1: from /var/lib/gems/2.7.0/gems/sassc-2.4.0/lib/sassc/engine.rb:50:in `render'
style.scss:5: Error: File to import not found or unreadable: reset. (SassC::SyntaxError)
on line 5:1 of style.scss
>> @import "reset";
^
29: from /home/john/gems/bin/jekyll:23:in `<main>'
28: from /home/john/gems/bin/jekyll:23:in `load'
27: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
26: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
25: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
24: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
23: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
22: from /var/lib/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
21: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
20: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
19: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
18: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
17: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
16: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
15: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
14: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
13: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:211:in `render'
12: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `render_pages'
11: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:538:in `each'
10: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:539:in `block in render_pages'
9: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
8: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
7: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:84:in `render_document'
6: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `convert'
5: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `reduce'
4: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:104:in `each'
3: from /var/lib/gems/2.7.0/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:106:in `block in convert'
2: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:186:in `convert'
1: from /var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:192:in `sass_convert'
/var/lib/gems/2.7.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:200:in `rescue in sass_convert': Error: File to import not found or unreadable: reset. (Jekyll::Converters::Scss::SyntaxError)
on line 5:1 of style.scss
>> @import "reset";
^
Upvotes: 0
Views: 502
Reputation: 27
The problem here is nothing to do with the main CSS file. The files were in _sass
and were all prefixed _
and were .scss
files.
It tries to find the imported CSS files (reset, variables, highlights, SVG-icons) but could not.
I'd been copying across some CSS from another working project but hadn't copied these files, which is why the error came. Once I'd pasted these across into the new project (in folder _sass
, main directory of project) then it built and serve just fine.
Thanks, @Christian for the pointer to get here.
Upvotes: 1