latexoverleaf

Try to referece a image, but it say it's undefined


...wie in der Abbildung: \ref{fig:serviceWorke} zu sehen ist. 

\vspace{0.5cm}
\begin{figure}
  \includegraphics[width=\textwidth]{gfx/chapter-2/service-worker-architectur.png}
    \caption{Service Worker Architektur [6] (S.24)}%
    \label{fig:serviceWorker}
\end{figure}
\vspace{0.5cm}

Trying to reference a image but it only display a "??".

That's the Error: Reference `fig:serviceWorke' on page 11 undefined on input line 126.

I don't get the Problem.

Thank you for help


Solution

  • Typo: fig:serviceWorker vs. fig:serviceWorke

    \documentclass{article}
    \usepackage{graphicx}
    
    
    \begin{document}
    
    ...wie in der Abbildung: \ref{fig:serviceWorker} zu sehen ist. 
    
    
    \begin{figure}[htbp]
      \includegraphics[width=\textwidth]{example-image-duck}
        \caption{Service Worker Architektur [6] (S.24)}%
        \label{fig:serviceWorker}
    \end{figure}
    
    
    \end{document}