# How to display the website on moderncv without errors?

I created a MWE that shows my problem

\documentclass{moderncv}
\moderncvstyle{classic}

\email{email@email.com}
\homepage{www.somewebsite.com}{www.somewebsite.com} % <-- A

\begin{document}
% \homepage{www.somewebsite.com}{www.somewebsite.com} % <-- B
\makecvtitle
\end{document}


If I compile this MWE, I receive the following error:

LaTeX Error: Missing \begin{document}. [\homepage{www.somewebsite.com}{w]


If, on the other hand I comment line A but uncomment line B then it works (by working I mean the website appears on the header) but the text also appears in the main document as shown in the following picture

I am on macOS, using tlmgr I confirmed that moderncv is updated to version 2.1 (which seems to be the latest).

Is this a bug on moderncv (I find it unlikely) or is this a problem of my installation? If so, how can I go and chase where the problem is?

\homepage, like \email takes a single argument. Since you've provided two, the latter is considered content that should be set within the document. Since it occurs before \begin{document}, LaTeX throws an error.
In short, just use \homepage{<website>}.