"No such file or directorycompilation terminated.make" in Windows 10

This error is occurring because your R packages are installed on a network drive (\file.UNIVERSITY.edu/home), rather than somewhere on your local computer. This causes R to have trouble finding compilation dependencies when Stan models are compiled.

To fix this, you need to move your R package library to somewhere on your local computer. If you’re not sure how to do that, I wrote up some example instructions over in this post (but you’ll need to change the destination directory depending on where you have write acess): Modeling failed Warnings: 'C:/Users/R-34~1.3/rtools40/usr/mingw_/bin/g++' not found Errors: Multiple results for CXX14FLAGS found, something is wrong.FALSE - #54 by andrjohns