  The introduction is modified in the revised version. Also, many typos and
errors were corrected.
  Let $W\to C$ be degeneration of smooth varieties so that the special fiber
has normal crossing singularity. In this paper, we first constructed the stack
of expanded degenerations of $W$. We then constructed the moduli space of
stable morphisms to this stack, which provides a degeneration of the moduli
spaces of stable morphisms associated to $W/C$. Using similar technique, for a
pair of smooth variety and a smooth divisor $(Z,D)$, we constructed the stack
of expanded relative pairs and then the moduli spaces of relative stable
morphisms to $(Z,D)$. In the subsequent paper we will construct the relative
Gromov-Witten invariants and prove a degeneration formula of Gromov-Witten
invariants.
