Starts and dies

i have a 91 gmc sonoma that has a brand new 2.5 lt engine that i just put in it a few months ago and it hasnt ran right since. i started wit the fuel system putting new injector, pump, sending unit, relay and filter. then put a new iac valve, map sensor and tps on it i put a new ignition module in it and it still jus starts and dies. ill start it and keep my foot on the gas and it will take fuel for a while then it seems to be lacking fuel and will die again. im pretty stumped everything that i thought it could be just hasnt been it any suggestions would be greatly appreciated

Next time it starts then quits, spray a little starting fluid into the air intake.
If it runs then quits you likely have a fuel supply problem.
Perhaps a dirty fuel filter, a damaged fuel line or a bad fuel pump or sticking relay.

If you have some idea how all the parts work together as a system (you know, Team Players], you have more insight of what isn’t working when things go wrong…like now.
When the ignition key is turned ON, the fuel pump runs for one, or two, seconds. The fuel pump doesn’t run again until it gets a signal from something…probably the engine computer. So, the engine uses up that first prime, doesn’t get any more from the not-running fuel pump, and dies.
You need to find out why the fuel pump isn’t getting a signal, or power, to run. A wrench, or socket, won’t supply that information.
What will supply that information, on powering the fuel pump are the wiring diagrams and a multimeter.
Here is the link to the wiring diagram:
If you go there, to be able to read the image, click on ENLARGE, and on your pc keyboard press the ctrl key and ++ eight to ten times.
You can check that the fuel pump can run, and pump fuel, if you go to the “fuel pump prime connector” and jumper to it from the battery positive.
The connector is a single wire, just hanging loose, near the fuel pump relay. The FP relay is, probably, in a plastic cylinder near the battery, all alone.
The oil pressure has to be high enough to power the fuel pump. That signal comes from the oil pressure sender.
Engine Control Module (ECM), controls power to the fuel pump relay. It decides to do that if it gets a signal (from the crankshaft position sensor?)
You can get answers to these, and other mysteries, by using the repair manual…a Haynes, Chilton’s, etc. Yes, you DO need one.