Start by preheating your oven to 375°F (190°C) and lining your baking sheets with parchment paper or silicone mats. This small prep step makes baking and cleanup way easier later on.
Using a large mixing bowl, whip the softened butter, light brown sugar, and granulated sugar together until light and fluffy. This creamy base is what helps give your cookies that soft, chewy texture everyone loves.
Crack in the eggs one by one, making sure to blend each one completely before adding the next. Then stir in the vanilla extract and a splash of brewed espresso. Don’t be intimidated by the espresso.
In a separate bowl, whisk together the flour, cocoa powder, baking soda, and salt until everything is well combined. Slowly fold this dry mixture into the wet ingredients, mixing gently just until you no longer see streaks of flour.
Use a spoon or cookie scoop to drop generous mounds of dough onto your prepared sheets, spacing them out so they have room to spread. Bake for about 10 minutes, keeping an eye out for edges that look set and slightly crisp, while the centers stay soft and chewy.
Transfer the freshly baked cookies to a wire rack and let them cool thoroughly before serving. This step is important because frosting warm cookies can cause it to melt and slide off.
For the frosting, combine the evaporated milk, granulated sugar, light brown sugar, egg yolks, butter, salt, and vanilla in a saucepan. Stir constantly over medium heat, until the mixture thickens enough to coat the back of a spoon, this usually takes around 9 minutes.
Take the pan off the heat and fold in the shredded coconut and chopped pecans until everything is well mixed together. Allow the frosting to cool down to room temperature, where it will thicken and become easy to spread.
Once the cookies are fully cooled, lavishly coat their tops with the coconut-pecan frosting. Don’t be shy, this frosting is the star of the show!