I just downloaded the ModernCV .zip file from LaTeXTemplates.com (link below) and when I try to compile it I get an error about not having a \begin{document} because of line 52. When I comment it out, then the file compiles fine. I'm asking because I'm having a similar problem in my own CV and I was trying to make a MWE and I can't even do that correctly.

I'm using TeXMaker compiling through LauLaTeX. I also tried with TeXWorks, same error. Could I have some problem in my installation? Or maybe my modernCV.sty is out of date somehow? I don't really fully understand how to update it other than going to MikTeX console and running the update button.
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help....
l.52 \homepage{staff.org.edu/~jsmith}{staff.org.edu/$\sim$jsmith} % The first ...
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
LaTeX Font Info: Trying to load font information for OT1+lmr on input line 5
2.
Suggestions welcome.
https://www.latextemplates.com/template ... ver-letter
-Michael