I am unable to use \uncover inside the text of a TikZ node. Here is what I would like to do:
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}[node distance=2cm]
\node[align=center] (a) {test 1 \\ \uncover<2>{test 12345}};
\node[align=center,right of=a] (b) {test 2};
\path[->] (a) edge (b);
\end{tikzpicture}
\end{frame}
\end{document}
This gives: "! Package tikz Error: Giving up on this path. Did you forget a semicolon?."
Using \onslide gives the same result. Using \only does work, but because my second line is longer, the node is enlarged and everything else shifts.
I'd be curious to understand why \only works but not \uncover or \onslide, but mostly, I would like to know if there is a simple way (e.g. simpler than having a minipage inside the node text) to prevent the node from changing size.


\phantomfor the relevant part of the first slide. ? – cfr Oct 04 '14 at 10:50