Errors compiling first stan model in R

Hi all,
Adding some more details. Some other things I have tried…when I uninstall the xcode app, then enter macrtools:: is_xcode_installed() the response changes to TRUE but then when I put the xcode app back in, the response changes to FALSE. I’ve gone through and both my cmdstanr and rstan folders seem to be in the right directory. I have also made sure permissions were changed from ‘read’ to ‘read and write’ but still experiencing the issue. Below is the expanded error message. Any ideas? Hoping to try on a different machine this weekend to see if I have any better results but hoping maybe someone sees something I don’t.
Thanks

Compiling Stan program…
Error in process_initialize(self, private, command, args, stdin, stdout, …:
! Native call to processx_exec failed
Caused by error in chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …:
! cannot start processx process ‘bin/stanc’ (system error 2, No such file or directory) @unix/processx.c:613 (processx_exec)
Type .Last.error to see the more details.

.Last.error
<c_error/rlib_error_3_0/rlib_error/error>
Error in process_initialize(self, private, command, args, stdin, stdout, …:
! Native call to processx_exec failed
Caused by error in chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …:
! cannot start processx process ‘bin/stanc’ (system error 2, No such file or directory) @unix/processx.c:613 (processx_exec)


Backtrace:

  1. rethinking::ulam(alist(log_gdp_std ~ dnorm(mu, sigma), mu ← a[cid] + b[cid] * …
  2. cmdstanr::cmdstan_model(stan_file = filex[[1]], compile = filex[[3]], cpp_options = cpp_options, …
  3. CmdStanModel$new(stan_file = stan_file, exe_file = exe_file, …
  4. local initialize(…)
  5. self$compile(…)
  6. cmdstanr:::get_standalone_hpp(temp_stan_file, stancflags_standalone)
  7. withr::with_path(c(toolchain_PATH_env_var(), tbb_path()), wsl_compatible_run(command = stanc_cmd(), …
  8. base::force(code)
  9. cmdstanr:::wsl_compatible_run(command = stanc_cmd(), args = c(paste0(“–o=”, …
  10. base::do.call(processx::run, run_args)
  11. (function (command = NULL, args = character(), error_on_status = TRUE, …
  12. process$new(command, args, echo_cmd = echo_cmd, wd = wd, windows_verbatim_args = windows_verbatim_args, …
  13. local initialize(…)
  14. processx:::process_initialize(self, private, command, args, stdin, stdout, …
  15. processx:::chain_call(c_processx_exec, command, c(command, args), pty, pty_options, …
  16. | base::withCallingHandlers(do.call(“.Call”, list(.NAME, …)), error = function(e) { …
  17. | base::do.call(“.Call”, list(.NAME, …))
  18. | base::.handleSimpleError(function (e) …
  19. | local h(simpleError(msg, call))
  20. | processx:::throw_error(err, parent = e)