Car not starting properly on 2001 Nissan Sentra

I recently got a new starter and timing chain. Usually in the mornings or at night after not driving for some time (5+ hours) the car will not start the first time after you crank it. Usually it takes a few times in order for the engine to start. Started happening recently. All of the lights work and the AC and radio turn on, but the engine doesn't and the battery light turns on along with the oil light.

Asked by for the 2001 Nissan Sentra