First thing to do is to check all connections, including the connections at the battery.
Most likely, you have a loose connection somewhere.
Terminals need to be clean and all corrosion removed, they also need to be very tight.
This should solve the problem as long as the original problem was the alternator.