Failed to parse/fit Stan model error rstan

This is unfortunately a known issue with rstan 2.26, try restarting your R session. More information in this post: Error: Expected end of file after end of generated quantities block - #5 by andrjohns