  We derive a formula for the energy of a path in the moduli space of a compact
$G_2$-manifold with vanishing first Betti number for the volume-normalised
$L^2$-metric. This allows us to give simple sufficient conditions for a path of
torsion-free $G_2$-structures to have finite energy and length. We deduce that
the compact $G_2$-manifolds produced by the generalised Kummer construction
have incomplete moduli spaces. Under some assumptions, we also state a
necessary condition for the limit of a path of torsion-free $G_2$-structures to
be at infinite distance in the moduli space.
