Error installing CmdStan, invalid conversion from 'const'

In case anyone bumps into this again, here’s what solved the issue for me:

  1. Uninstalled and reinstalled Rtools 4.2 and Tools 4.0
  2. Installed cmdstan using cmdstanr. I did everything from Rstudio

Thanks so much for your help @andrjohns.