8. For any positive integer $n$, if
$$
1^{n}+2^{n}+\cdots+(n-1)^{n}<C n^{n} \text {, }
$$

then the minimum value of $C$ is $\qquad$ .
8. $\frac{1}{e-1}$.

Notice, for positive integers $n, k (n > k)$, we have
$$
\begin{array}{l}
\frac{1}{e^{k}}\left(\frac{n-k}{n}\right)^{k} > 1 - \delta \text{ for some } k \text{ such that } \left(\frac{n-k}{k}\right)^{k} > 1 - \delta.
\end{array}
$$
Then for positive integers $l (1 \leq l \leq k)$,
$$
\begin{array}{l}
\left(\frac{n-l}{n}\right)^{l} \geq \left(\frac{n-k}{k}\right)^{k} > 1 - \delta. \\
\text{Thus, } \frac{1^{n} + 2^{n} + \cdots + (n-1)^{n}}{n^{n}} \\
> \left(\frac{n-1}{n}\right)^{n} + \left(\frac{n-2}{n}\right)^{n} + \cdots + \left(\frac{n-k}{n}\right)^{n} \\
> \frac{1}{e} \cdot \frac{n-1}{n} + \frac{1}{e^{2}}\left(\frac{n-2}{n}\right)^{2} + \cdots + \frac{1}{e^{k}}\left(\frac{n-k}{n}\right)^{k} \\
> (1 - \delta)\left(\frac{1}{e} + \frac{1}{e^{2}} + \cdots + \frac{1}{e^{k}}\right) \\
\quad = (1 - \delta) \frac{1 - \frac{1}{e^{k}}}{e - 1} \\
> (1 - \delta)\left(\frac{1}{e - 1} - \delta\right) \\
> \frac{1}{e - 1} - \delta\left(\frac{1}{e - 1} + 1\right) \\
> \frac{1}{e - 1} - \varepsilon = C.
\end{array}
$$

Therefore, there exists a positive integer $n$ such that $C$ does not satisfy the original inequality.
In conclusion, the minimum value of $C$ is $\frac{1}{e - 1}$.