How to decypher Arxiv latex compilation errors

I am trying to make my first submission to arXiv. I have a document with multiple include modules and images. When arXiv compiles it, it throws a lot of output, the major error being:

! LaTeX Error: Unknown option 'nameinlink' for package 'cleveref'.


Needless to say that the document compiles no problem on my machine.

I will write the document preamble here, perhaps it is of any help

\documentclass[a4paper,11pt]{article}

\usepackage[sort&compress,super]{natbib}
\usepackage[T1]{fontenc}

\usepackage[english]{babel}
\usepackage{amsmath, esint}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{url}
\usepackage{array}
\usepackage{algorithm,algorithmic}
\usepackage{tikz}
\usepackage{url}
\usetikzlibrary{arrows}
\usetikzlibrary{mindmap,trees}
\usepackage[overlay,absolute]{textpos}
\usepackage{wrapfig}
\usepackage{makeidx}
\usepackage{listings}
\usepackage{color}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[normalem]{ulem}
\usepackage{mathtools}
\usepackage{lscape}
\usepackage{hyperref}
\usepackage{cleveref}

\usepackage{mdframed}
\definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}


EDIT

Removing [nameinlink] from cleveref brings me one step further:

! LaTeX Error: Option clash for package hyperref.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.107 \begin
{document}
?
! Emergency stop.
...


EDIT 2

Sorry, I forgot the mdframed in the original post

• typically it's just because they have an old tex distribution and presumably the cleverref package didn't have that option then, simplest if you do not need it is simply to remove [nameinlink] – David Carlisle Dec 7 '16 at 14:09
• Welcome to TeX.sx! Please give a minimal working example (MWE). – strpeter Dec 7 '16 at 14:10
• Hey strpeter, I am afraid that a minimal working example will require me two hours of uploading different files to arxiv system, sorry – Aleksejs Fomins Dec 7 '16 at 14:18
• that's odd in the code you show you only load hyperref once and with no options, the h text of that message shows exactly which option is clashing I'm not sure if you can get that back from arxiv? otherwise perhaps there system adds hyperref in which case you could simply comment out your \usepackage{hyperref} – David Carlisle Dec 7 '16 at 15:47
• I've had exactly this problem with several arXiv submissions, and I'm pretty sure it's because (as David Carlisle speculates) they have an outdated version of cleveref. The simplest solution is to include an up-to-date cleveref.sty as one of the files in your submission. – Matt Fayers Dec 7 '16 at 22:34