Example 4 Find all positive integer solutions to the indeterminate equation
$$(n-1)!=n^{k}-1$$
When $n=2$, from (1) we get the solution $(n, k)=(2,1)$. When $n>2$, the left side of (1) is even, so its right side must also be even, hence $n$ is odd. When $n=3,5$, from (1) we solve $(n, k)=(3,1), (5,2)$.

Below, let $n>5$ and $n$ be odd. In this case, $\frac{n-1}{2}$ is an integer and $\frac{n-1}{2}(n-1)!$

This indicates that when $n>5$, equation (1) has no positive integer solutions, i.e., the complete set of positive integer solutions to (1) is $(n, k)=(2,1),(3,1),(5,2)$.