Combine sugar and milk in a large bowl; whisk until smooth.
Mix the flour, salt, and cocoa in a small mixing bowl and then carefully whisk into the milk mixture.
Cook, stirring constantly until mixture thickens.
Add some of the hot mixture to the egg yolks and then quickly stir the egg yolks into the pudding mixture.
Heat for approximately one more minute. Mixture will be quite thick.
Remove from heat and add the butter.
Stir until melted and add the vanilla.
Mix all of the ingredients together except the egg yolks, butter, and vanilla.
Microwave on 100% for 3 minutes.
Microwave on 50% until the mixture thickens.
Whisk some of the hot mixture into the egg yolks then whisk the egg yolks back into the pudding.
Microwave on 50% for 2 minutes.
Stir in the vanilla and butter.
Assembling the pie
Pour the hot filling into baked pie shell.
Spray plastic wrap with no stick cooking spray and put it carefully, spray side down, over the surface of the filling while it's warm.
Chill several hours or overnight.
The filling can be made with heavy cream, half and half, or whole milk if you don't want to use evaporated milk.It can even be made with a combination of them but do not make it with skim milk. You will lose the texture completely.I think that the evaporated milk works the best and results in the creamiest, chocolatiest texture so please try that at least once.
Be sure to bring the eggs up to the same temperature as the milk mixture by mixing in the hot mixture a little at a time. This will keep them from curdling and turning into scrambled eggs.
If you do curdle the eggs slightly you can push the pudding through a strainer to get the lumps out.
If you are making this on the stovetop take your time and be patient. Cook over medium heat or you run the risk of scorching the bottom.