Stalls after starting

my caravan was running great when one day it just quit while driving. i had it towed home and when it got here i tryed to start it and it started right up. it ran good for about 2 min. then it died again.i tryed to start it and it didn’t start. i cycled the ignition all the way off and then started it again and it ran for a min. or so then quit. when it quits it looses spark and fuel. it acts just like the car is turned off. i have replaced relays coils and crank positioning sensors. i also had the ignition checked. i’m lost as what it can be. help