Problems running script/cibuild

Hi,

I cloned the Jekyll repo (both at Master and at v4.2.0) and ran the following:

git clone https://github.com/jekyll/jekyll
sudo docker run -v "$(pwd):$(pwd)" -w "$(pwd)" -it ruby:latest /bin/bash
./script/bootstrap
./script/cibuild

When I run this, I get a big block of error at the end, basically saying that I don’t have enough Javascript to build it.

What do I need to do? I’ve got a PR I want to raise, but I’m out of my depth with fixing this.

I created an asciinema of this here: Jekyll `cibuild` error - asciinema

I should also note that when I did the above with the v4.2.0 tag, I had to add this command (echo 'gem "webrick"' >> Gemfile) as this is a new dependency that appeared following the 4.2.0 release. The instruction for that here looks like this:

git clone https://github.com/jekyll/jekyll
git fetch --tags
git checkout v4.2.0
echo 'gem "webrick"' >> Gemfile
sudo docker run -v "$(pwd):$(pwd)" -w "$(pwd)" -it ruby:latest /bin/bash
./script/bootstrap
./script/cibuild

Here’s the asciinema of that: Jekyll `cibuild` error on v4.2.0 - asciinema

Quick answer is: you need Node.js to run the tests. I.e., install the Node package before running cibuild:

apt-get update && apt-get install nodejs
1 Like

Long answer/explanation: Jekyll’s CI scripts are mainly used in a Github Actions workflow, so they assume the environment setup in .github/workflows/ci.yml. That workflow uses Github’s latest Ubuntu image, which comes with a dizzying array of pre-installed packages. At the moment, the only dependencies seem to be Ruby and Node.js.

Another option might be to use the Dockerfile from the VSCode Development Container. It does specify the packages necessary for Jekyll development, although it hasn’t been updated in a year.

The real bug here is that Jekyll’s development/contributing docs don’t mention the Node.js requirement anywhere.

You need to install Node on your system or you need to use a Dockerfile and add Jekyll and Node.

What is the intention around cloning the Jekyll repo? To develop on Jekyll?

If you need Jekyll as a binary container to run or to combine Jekyll and Node in a Dockerfile, I can recommend the Jekyll image on Dockerhub.

I have explanations on both approaches I mentioned.

Note using apt update and apt-get install node.js will work alone. You just end up with Node 10. For more recent versions you need to add a debian source.

The VS Code container linked above provides a solution for Node inside a container using Node 13. Which is weird as 12 and 14 are the long term supported ones that are most used. So change your URL to 14.

Here is how I install Node 14 on my system, outside a container.

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

Based on Node docs