according here, set
library(rstan)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)
Sys.setenv(LOCAL_CPPFLAGS = "-march=corei7 -mtune=corei7")
the error goes away. So rewrite priors as
target += normal_lpdf(alpha | 0, 100);
target += normal_lpdf(beta | 0, 10);
target += cauchy_lpdf(phi | 0, 2);
model works again and now looks near perfect.