<div dir="ltr">That is probably because the moderncv package uses pdftex condition control sequences (\ifpdf), so to resolve this, I think, you will need to make a few changes in the package either delete \ifpdfs or replace them with \ifxetex.<br>
</div>