engine dies after start up

If all of the electronics are the same as they were before the swap, check the ballast resisitor. Check the wiring around it and to it. If its bad, they are cheap. This is consistant with a problem associated with them. Just an idea.