Cloudflare Pages does not recognize Zola and build fails

This is the first time I’ve ever tried deploying a personal blog using any tool (and, asking for help in a programming forum), so I’m assuming I’m just forgetting a simple step.

I followed the steps in the website, set up the build configurations with the default Values, so the command is zola build and build output directory is /public.

Then I’ve added the environment variable like this


And the build logs tell me this

00:04:00.227	HEAD is now at 9cb8515 feat: initial commit
00:04:00.375	Success: Finished cloning repository files
00:04:01.059	Detected the following tools from environment: 
00:04:01.060	Executing user command: zola build
00:04:01.068	/bin/sh: 1: zola: not found
00:04:01.069	Failed: Error while executing user command. Exited with error code: 127
00:04:01.077	Failed: build command exited with code: 1
00:04:01.982	Failed: error occurred while running build command

Because the “detected tools” is empty and zola wasn’t even recognized, I’m assuming it’s either a silly mistake or something weird that’s out of my control.

1 Like

According to this pull request, it seems like the second version of build configs of Cloudflare Pages not installing the zola binary automatically. Switching to version 1 fixes it, and the steps are described in the pull request.

1 Like

Cross posting my comment here v2 build system breaking Zola sites · Issue #3 · cloudflare/pages-build-image · GitHub

Apologies for the issues using the v2 build image. I’ll look into adding Zola.

As a workaround, you can leverage asdf in your build command (or the UNSTABLE_PRE_BUILD env var) and install the zola plugin and version there by prefixing your build command with this rather lengthy set of commands:

asdf plugin add zola && asdf install zola 0.17.2 &&  asdf global zola 0.17.2 &&
1 Like