Development
How to Fix 'jekyll-autoprefixer' Error Running Ruby 3.0.0
Here's a fix for Jekyll if you cannot build your project after updating Ruby to the latest version.
I postponed upgrading my Ruby environment to 3.x.x for a while because I couldn’t build or serve this Jekyll site due to the error with jekyll-autoprefixer.
Here is the error I encountered when I tried to build this site.
TypeError: Cannot read property 'version' of undefined (ExecJS::ProgramError)
I assume you’re using Bundler to manage the gems. If you’re not familiar with Bundler, I recommend that you check it out and use it to set up dependencies for your project.
You can fix the error by downgrading execjs back to 2.7.0.[1] Add the following line gem 'execjs', '2.7.0' to your Gemfile.
Then run bundle update to update all the installed gems.
You can check out this issue to see a different method to fix it. ↩︎
If this was useful, continue through the archive or follow the thread through related notes.