I only get errors because you can't put blank lines inside the tikzcd environment.
If you remove them, it compiles fine.
MWE:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
& C^\prime \arrow[dr, "g"] & \\
C \arrow[ur, "f"]\arrow[rr, "g\circ f"] & & C^{\prime\prime}
\end{tikzcd}
\end{document}

If you have an old tikz-cd you can try with the old syntax of \arrow
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
& C^\prime \arrow{dr}{g} & \\
C \arrow{ur}{f}\arrow{rr}{g\circ f} & & C^{\prime\prime}
\end{tikzcd}
\end{document}
If it still fails, try adding blank atoms {} at empty positions (thanks to daleif for the suggestion), so either
\begin{tikzcd}
{} & C^\prime \arrow[dr, "g"] & {}\\
C \arrow[ur, "f"]\arrow[rr, "g\circ f"] & {} & C^{\prime\prime}
\end{tikzcd}
or (with old syntax)
\begin{tikzcd}
{} & C^\prime \arrow{dr}{g} & {}\\
C \arrow{ur}{f}\arrow{rr}{g\circ f} & {} & C^{\prime\prime}
\end{tikzcd}