Cannot open Stan example models

Hi everyone,

New Stan and R user here. I wanted to play with the example Eight Schools model to get a feel for Stan so I ran the following code:

library(rstan)

stan_demo("eight_schools")

After which, I received the following error message:

> J <- 8

> y <- c(28,  8, -3,  7, -1,  1, 18, 12)

> sigma <- c(15, 10, 16, 11,  9, 11, 10, 18)

> tau <- 25
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
  '-E' not found
2: In system(cmd, intern = !verbose) :
  running command 'C:/PROGRA~1/R/R-40~1.2/bin/x64/R CMD SHLIB file21e873413f17.cpp 2> file21e873413f17.cpp.err.txt' had status 1
3: In file(con, "r") :
  cannot open file 'file21e873413f17.cpp.err.txt': No such file or directory
Error in sink(type = "output") : invalid connection

I have absolutely no idea what this means. Any help would be much appreciated!

Here is my system/environment information:

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Also- using rstan version 2.21.2