Deploy issues - can't re-deploy older version :(

Hello! I need advice to debug deploy Netlify App

The version that deployed successfully 2 weeks ago is here, Netlify App but now won’t re-deploy, which makes me think it’s an issue with the dependency “just the docs” (this comes up in the error message. However, I can’t get the older deploy to re-deploy, even if I change the dependency to a really old verison of the plugin - not sure what I’m doing wrong.

Here is the failing deply log:

7:08:49 PM: ❯ Version
7:08:49 PM:   @netlify/build 5.1.0
7:08:49 PM: ​
7:08:49 PM: ❯ Flags
7:08:49 PM:   deployId: 5fa04afcd700b2000817da1d
7:08:49 PM:   mode: buildbot
7:08:49 PM: ​
7:08:49 PM: ❯ Current directory
7:08:49 PM:   /opt/build/repo
7:08:49 PM: ​
7:08:49 PM: ❯ Config file
7:08:49 PM:   No config file was defined: using default values.
7:08:49 PM: ​
7:08:49 PM: ❯ Context
7:08:49 PM:   production
7:08:49 PM: ​
7:08:49 PM: ❯ Loading plugins
7:08:49 PM:    - netlify-plugin-minify-html@0.3.0 from Netlify app
7:08:49 PM: ​
7:08:49 PM: ┌───────────────────────────────────┐
7:08:49 PM: │ 1. Build command from Netlify app │
7:08:49 PM: └───────────────────────────────────┘
7:08:49 PM: ​
7:08:49 PM: $ bundle exec jekyll build
7:08:50 PM: Configuration file: /opt/build/repo/_config.yml
7:08:50 PM:             Source: /opt/build/repo
7:08:50 PM:        Destination: /opt/build/repo/_site
7:08:50 PM:  Incremental build: disabled. Enable with --incremental
7:08:50 PM:       Generating...
7:08:50 PM:        Jekyll Feed: Generating feed for posts
7:08:53 PM:   Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/just-the-docs-dark.scss':
7:08:53 PM:                     Undefined variable: "$nav-list-item-height-sm". on line 23
7:08:53 PM: jekyll 3.9.0 | Error:  Undefined variable: "$nav-list-item-height-sm". on line 23
7:08:53 PM:                 Undefined variable: "$nav-list-item-height-sm". on line 23
7:08:53 PM: jekyll 3.9.0 | Error:  Undefined variable: "$nav-list-item-height-sm". on line 23
7:08:53 PM: ​
7:08:53 PM: ┌─────────────────────────────┐
7:08:53 PM: │   "build.command" failed    │
7:08:53 PM: └─────────────────────────────┘
7:08:53 PM: ​
7:08:53 PM:   Error message
7:08:53 PM:   Command failed with exit code 1: bundle exec jekyll build
7:08:53 PM: ​
7:08:53 PM:   Error location
7:08:53 PM:   In Build command from Netlify app:
7:08:53 PM:   bundle exec jekyll build
7:08:53 PM: ​
7:08:53 PM:   Resolved config
7:08:53 PM:   build:
7:08:53 PM:     command: bundle exec jekyll build
7:08:53 PM:     commandOrigin: ui
7:08:53 PM:     publish: /opt/build/repo/_site
7:08:53 PM:   plugins:
7:08:53 PM:     - inputs: {}
7:08:53 PM:       origin: ui
7:08:53 PM:       package: netlify-plugin-minify-html
[...]
7:08:59 PM: Build failed due to a user error: Build script returned non-zero exit code: 2

7:08:59 PM: Failing build: Failed to build site

7:08:59 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2

7:08:59 PM: Finished processing build request in 59.672465463s

I see this error in the link you posted.

Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/just-the-docs-dark.scss':
11:38:53 PM:                     Undefined variable: "$nav-list-item-height-sm". on line 23

An undefined SCSS variable at line 23 in file assets/css/just-the-docs-dark.scss. Does fixing that help?

Also, if an old deploy worked, you should be able to just download the final generated assets. You can then reupload them for a temporary fix, so that the website isn’t down (if it’s down).

Hi, @olliepalmer. I was able to reproduce the issue outside of Netlify as this repo is public.

A fresh clone with the same Ruby, Node, and Bundler versions give this error for me locally:

$  ~/tmp/scripted-design-course : 2020-11-03 08:38:13 :
$ bundle exec jekyll build
Configuration file: /home/username/tmp/scripted-design-course/_config.yml
            Source: /home/username/tmp/scripted-design-course
       Destination: /home/username/tmp/scripted-design-course/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/just-the-docs-dark.scss':
                    Undefined variable: "$nav-list-item-height-sm". on line 23
jekyll 3.9.0 | Error:  Undefined variable: "$nav-list-item-height-sm". on line 23

To summarize, this isn’t anything caused by Netlify. Our support team doesn’t troubleshoot third-party code (because of our support scope) but someone else here on the community site might be able to assist with this.

Hi @luke and @Siteme, thanks for looking into this. I think the problem arose from a dependency in one of the plugins I was using. I fixed the problem by creating a fresh empty Jekyll site and migrating content and templates bit-by-bit, testing locally, then eventually replacing the entire original site with the one that worked. I’m still not sure exactly which part of the site didn’t work (something in an scss file) but it did give me the chance to clean up the scss dependencies and do some general house-keeping.

Thanks for your help!

1 Like