Language support and tools
Cloudflare Pages’ build environment has broad support for a variety of languages, such as Ruby, Node.js, Python, PHP, and Go.
If you need to use a specific version of a language, (for example, Node.js or Ruby) you can specify it by providing an associated environment variable in your build configuration, or setting the relevant file in your source code.
In the following table, review the preinstalled versions for tools included in the Cloudflare Pages build environment, and how to override them as relevant:
Language | Default version | Supported versions | Environment variable | File |
---|---|---|---|---|
Clojure | ||||
Elixir | 1.7 | 1.7 only | ||
Emacs | 25 | 25 only | ||
Erlang | 21 | 21 only | ||
Go | 1.14.4 | Any version | GO_VERSION | |
Java | 8 | 8 only | ||
Node.js | 12.18.0 | Any version | NODE_VERSION | .nvmrc , .node-version |
PHP | 5.6 | 5.6, 7.2, 7.4 only | PHP_VERSION | |
Python | 2.7 | 2.7, 3.5, 3.7 only | PYTHON_VERSION | runtime.txt , Pipfile |
Ruby | 2.7.1 | Any version between 2.6.2 and 2.7.5 | RUBY_VERSION | .ruby-version |
Swift | 5.2.5 | Any 5.x version | SWIFT_VERSION | .swift-version |
.NET | 3.1.302 |
Many common tools have been preinstalled in the Cloudflare Pages build environment. The environment variable available for overriding the preinstalled version is specified in the following table, as available:
Tool | Default version | Supported versions | Environment variable |
---|---|---|---|
Boot | 2.5.2 | 2.5.2 | |
Bower | |||
Cask | |||
Composer | |||
Doxygen | 1.8.6 | ||
Emacs | 25 | ||
Gutenberg | (requires environment variable) | Any version | GUTENBERG_VERSION |
Hugo | 0.54.0 | Any version | HUGO_VERSION |
GNU Make | 3.8.1 | ||
ImageMagick | 6.7.7 | ||
jq | 1.5 | ||
Leiningen | |||
OptiPNG | 0.6.4 | ||
npm | Corresponds with Node.js version | Any version | NPM_VERSION |
pip | Corresponds with Python version | ||
Pipenv | Latest version | ||
sqlite3 | 3.11.0 | ||
Yarn | 1.22.4 | Any version from 0.2.0 to 1.22.19 | YARN_VERSION |
Zola | (requires environment variable) | Any version from 0.5.0 and up | ZOLA_VERSION |
If you want to set a specific version of a framework your Cloudflare Pages project is using, note that Pages will respect your package manager of choice during your build process. For example, if you use Gatsby, your package.json
should indicate a version of the gatsby
npm package, which will be installed using npm install
as your project builds on Cloudflare Pages.
Build environment
Cloudflare Pages builds are run in a gVisor container.
Operating system | Ubuntu 20.04.5 |
Architecture | x86_64 |