Jekyll Build Not Working after MacOS High Sierra Update

Not sure if this is a bug, but searching the interweb for solution was no good. Everything was working fine using a combination of Grunt, Jekyll and Homebrew to create my website. But once I updated to High Sierra Jekyll “Build” fails.

The way I usually run Jekyll build is via grunt-shell task like so:

grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),


        shell: {
            jekyllBuild: {
                command: 'jekyll build'
            }
        },
       connect: {
            server: {
                options: {
                    hostname: 'localhost',
                    port: 4000,
                    base: '_build'
                }
            }
        },
...
      watch: {           
            jekyll: {
                options: {
                    livereload: true
                },
                files: [
                    '**/*.scss',
                    '**/*.html',
                    '**/*.js', 
                    // The negations must go after
                    '!*node_modules/**',
                    '!*_build/**',
                    '*.md', 
                    '*.yml',   
                    'img/**',
                    ],
                tasks: ['shell:jekyllBuild','postcss']
            }
        }
    });

...

grunt.registerTask('serve', ['shell','connect','watch']);

Which gives the following error:

Running "shell:jekyllBuild" (shell) task
Configuration file: [URL]/_config.yml
            Source: [URL]
       Destination: _build
 Incremental build: disabled. Enable with --incremental
      Generating... 
jekyll 3.6.0 | Error:  negative argument
Warning: Command failed: jekyll build
 Use --force to continue.

Aborted due to warnings.

Everything else I run works except Jekyll.

I also tried just running jekyll buildwithout shell task but still got an error:

jekyll 3.6.0 | Error:  negative argument
Warning: Command failed: jekyll build
 Use --force to continue.

Aborted due to warnings.

I am using Homebrew to keep things local and everything seems to be in the correct location:

600-8997-MAC:~$ which jekyll
/usr/local/bin/jekyll
600-8997-MAC:~$ which ruby
/usr/local/bin/ruby
600-8997-MAC:~$ which grunt
[URL]/.npm-packages/bin/grunt
600-8997-MAC:~$ which gem
/usr/local/bin/gem
600-8997-MAC:~$ which node
/usr/local/bin/node

I realize, my setup may not be the best, but it was working so I’m hoping for some guidance. I was not the one to initially create this setup and I’m not a programmer but rather a web designer who can hack things together to my own detriment at times :slight_smile:

I appreciate any help

If I had to guess it’s something related to your Ruby environment. macOS updates coupled with Xcode updates tend to break things, especially if you’re using the built-in version of Ruby.

But hard to tell from the error above. Do you get anything more descriptive if you run Jekyll with the verbose flag?

jekyll build --verbose
1 Like

You are correct! We narrowed it down and sort of resolved the issue. A plugin we were using to create relative links within Jekyll needed a change in syntax all of the sudden. Below is a gist for the original plugin code. When plugin is removed the local development works but plugin is broken and no longer creates page relative links. Working on a fix now. I’ll be sure to share it if I get there :slight_smile: