While cranking does the check engine light go out? If not, the ECU isn't getting a crank signal and doesn't know when to fire the injector or plugs. That would be a CKP (crank position sensor) or related wiring/connectors. Other option, ECU is dying, but that's a last thing on the list.