Just for shits and giggles I decided to get this working on apple silicon & macOS, took me an hour
I used asdf for handling the versioning of elixir/erlang/node/python:
asdf plugin-add python
asdf plugin-add nodejs
asdf plugin-add elixir
asdf plugin add erlang
I attempted and failed to install elixir 1.5 and erlang 20 and node 6.17.1 (and 7.10.1). I ended up with nodejs 8.17.0 python 2.7.18 elixir 1.6.6-otp-21 erlang 21.3.8.24
asdf install erlang 21.3.8.24
asdf install elixir 1.6.6-otp-21
asdf install python 2.7.18
(I didn’t have python 2.6 or 2.7 installed, older versions of node-build rely on this)
for node, I needed to switch to rosetta mode before installing.
arch -x86_64 bash
(for me, zsh didn’t work so I dropped into bash first then ran zsh)
asdf install nodejs 8.17.0
in a new terminal with my ~/tceapbat/.tool-versions file set to (tceapbat was my project directory for The Complete Elixir and Phoenix Bootcamp and Tutorial)
nodejs 8.17.0
python 2.7.18
elixir 1.6.6-otp-21
erlang 21.3.8.24
installed phoenix 1.2.5:
curl -o phoenix_new-1.2.5.ez https://raw.githubusercontent.com/phoenixframework/archives/master/phoenix_new-1.2.5.ez
mix archive.install phoenix_new-1.2.5.ez
mix phoenix.new discuss
Notes: need to run deps.get properly before npm install even works.
cd discuss/
mix deps.get
npm install
node node_modules/brunch/bin/brunch build
mix phoenix.server
mix ecto.create
It ended up installing a newer version of expo that required a higher version of elixir, so my trick here was to grab the example repo, run mix deps.get, and then copy over the mix.exs & mix.lock files.:
git clone https://github.com/StephenGrider/ElixirCode/
cd ElixirCode/discuss/
mix deps.get
mix phoenix.server
cp mix.* ~/tceapbat/discuss/
also I found it was necessary to increase phoenix_live_reload from 1.0 to 1.1 in mix.exs {:phoenix_live_reload, "~> 1.1", only: :dev}