How to use STAN 2.26 and higher in rstan

I am writing to get some pointers on how to use STAN 2.26 in rstan to utilzemany additional functions which are available in the later versions of STAN

The instructions here

installs rstan 2.26 and StanHeaders.

However, a code that compiles in the CRAN version of rstan returns compilation errors.

Also error diagnostics prompts in the R editor no longer works.

There is a long series of discussions on this issue here

Is there a resolution of this issue?

Thank you

Can you show your code and the error that you are getting?