Preheat the oven to 350 degrees F, add papers to cupcakes tin then grate the carrots, and toast the nuts.
Beat the sugar, oil, eggs, and vanilla together in a large bowl.
In another bowl, sift together dry ingredients and whisk together.
Add the dry ingredients to the wet ingredients. Mix together until just combined and scrape the bowl down.
Fold the carrots and walnuts into the batter.
Fill the cupcake papers about 3/4 the way up. I usually use an ice cream scooper
Bake at 375F for 5 minutes then reduce to 350F and bake another 12 minutes, or until springy in center.
Allow the cupcakes to cool completely before frosting.
For the Cream Cheese Frosting:
Cream the butter and cream cheese in the bowl of an electric mixer fitted with the paddle attachment. Mix in the vanilla until well combined, scrape the bowl down then add the confectioners sugar and mix until smooth.
Transfer the cream cheese frosting to a piping bag fitted with a star tip then pipe a swirl on top. You can garnish with chopped walnuts If desired.
If you would like to pipe some carrots on top then create a flat base of white buttercream on the cupcakes by piping a flat round and smoothing with a knife or spatula. Then pipe orange frosting with a medium round tip for the carrots and use a small leaf tip to pipe the leafy top.
Measure your flour correctly! Adding too much flour to the recipe is the most common mistake. The best and easiest way to measure flour is by using a scale. If you don't have one then fluff your flour with a spoon, sprinkle it into your measuring cup, and use a knife to level it off.
Make sure that your refrigerated ingredients are at room temperature before using.
It's really important to grate the carrots yourself as pre-shredded carrots are too dry and won't add moisture to the cupcakes.
You can also use a food processor to grate the carrots.
Toasting the pecans really brings out their flavor and aroma so it's well worth doing.
The nuts can be omitted or you can use walnuts instead.
make sure to use cream cheese in blocks and not tubs.
If your frosting is runny then add more powdered sugar a cup at a time until the consistency thickens up. You can also chill the frosting slightly so it firms up.
You can easily adapt the flavor by adding shredded coconut, raisins, or even chocolate chips.
I find that a little vanilla added to the frosting makes it perfectly sweet but feel free to switch it up with different flavored extracts or even some cinnamon.
To check the cupcakes are done insert a toothpick into the middle if it comes out clean with just a few crumbs they are ready and wet batter means they need a little longer.
Make sure you let the cupcakes cool completely before frosting or the frosting will just melt.
You can top the cupcakes with some more chopped toasted pecans for an effortless and quick garnish.
This recipe can be doubled if you want to make a bigger batch.
Storage - frosted cupcakes will keep well in the fridge for 3-4 days. Unfrosted cupcakes can be frozen.