01 - Preheat oven to 350°F. Line a 12-cup muffin pan with cupcake liners.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
03 - In a large bowl, beat eggs, granulated sugar, vegetable oil, applesauce, and vanilla extract until fully incorporated and slightly thickened.
04 - Gradually fold the dry mixture into the wet ingredients until just combined. Avoid overmixing.
05 - Gently fold in grated carrots and, if desired, chopped walnuts or pecans.
06 - Divide batter evenly among muffin liners, filling each about three-quarters full.
07 - Bake for 20 to 22 minutes, or until a toothpick inserted in the center comes out clean.
08 - Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
09 - Beat softened butter and cream cheese together until smooth. Gradually add powdered sugar, followed by vanilla extract and a pinch of salt. Continue beating until mixture is light and fluffy.
10 - Once cupcakes are completely cooled, generously frost each with cream cheese frosting.