Preheat your oven to 350°F and line a muffin tin with cupcake liners.
In a large bowl, whisk together the flour, sugars, baking powder, baking soda, salt, cinnamon, nutmeg, and cloves.
In another bowl, whisk the eggs, oil, and vanilla, then stir in the grated carrots.
Pour the wet mixture into the dry and stir until just combined — don't overmix. Fold in nuts if using.
Scoop the batter into liners, filling each about two-thirds full. Bake for 18 to 22 minutes, or until a toothpick comes out clean. Let the cupcakes cool completely before frosting.
To make the frosting, beat the cream cheese and butter together until smooth and creamy. Gradually add the powdered sugar, mixing until fluffy. Beat in the vanilla and add cream if needed to thin.
Spread or pipe the frosting onto the cooled cupcakes. Sprinkle with chopped nuts or a dusting of cinnamon.
Notes
Make ahead: bake a day ahead, store unfrosted in an airtight container, and frost right before serving.