Preheat oven to 350°F (175°C) and line a muffin pan.
In a bowl, whisk flour, baking powder, baking soda, spices, and salt.
In another bowl, whisk eggs, sugar, oil, and vanilla until smooth.
Stir in grated carrots.
Add dry ingredients and gently mix until just combined.
Divide batter evenly into cupcake liners.
Bake for 18–22 minutes, until a toothpick comes out clean.
Cool completely before frosting.
Beat cream cheese and butter until smooth, then mix in powdered sugar and vanilla.
Frost cooled cupcakes and serve.