Deploy to fails. `undefined function config_env/0`

Here’s the file:

#!/usr/bin/env bash
# exit on error
set -o errexit

# Initial setup
mix deps.get --only prod
MIX_ENV=prod mix compile

MIX_ENV=prod mix assets.deploy
MIX_ENV=prod mix phx.gen.release

# Build the release and overwrite the existing release directory
MIX_ENV=prod mix release --overwrite

I’m able to do a production build locally.

However it doesn’t build on Render!

Turns out config_env was introduced in latest version of Elixir.

And Render uses older version of Elixir, and we are supposed to manually supply the version of Elixir & Erlang.

The official documentation lacks this.

At least that solved the, build issue.