2. Find the positive integer solutions of the following indeterminate equation
$$
(n-1)!+1=n^{m} \text {. }
$$
By Wilson's Theorem, we know that $n$ must be a prime number. When $n=2$, $m=1$.
Consider the case where $n$ is an odd prime.
If $m$ is odd, using the Lifting The Exponent (LTE) lemma, we get
$$
v_{2}\left(n^{m}-1\right)=v_{2}(n-1)<v_{2}((n-1)!) \text {. }
$$

The original equation has no solution.
If $m$ is even, we can obtain $(m, n)=(5,2)$.