That's what's going to happen in Germany. By 2036 the country plans to phase out all of its nuclear power plants. Right now those plants provide about 25% of Germany's electrical power. To prepare for that day, in a couple decades, when all the country's nuclear power plants have been shut down, Germany has begun aggressive programs to substitute that lost source of energy with reusable means of electrical production.
Everyone has seen solar electric panels. Here in Germany they are a very common sight. In the towns, cities and countryside you'll see an entire roof on a house, shed or barn covered with solar panels. Huge solar panel fields can be seen too. (Apparently electricity is the new farmer's cash crop.) With government incentives, a person who installs electrical generating solar panels on a building can recover that cost in six to eight years, unlike the twenty years it takes in the U.S. Here's a typical house in our village of Weilerbach.
Another source of electrical energy that everyone is familiar with is windmill generators. These huge windmills seem to be everywhere in Germany. Usually you see them in groups of eight or ten but sometimes thirty or forty. New ones are going up every day. On our drive to Frankfurt recently we saw a field where three new windmills were going up next to another six. I'm sure the German government has offered significant enticements to windmill manufacturers and electrical producers to expedite the transition to this source of energy. These windmills are high on the ridge above Weilerbach just west of Eulenbis.
So whether or not the German plan to shut down their nuclear powerplants is a good idea, I think they'll be ready when the last switch is thrown.