Preheat the oven to 350 degrees. Prepare a muffin tin by lining with cupcake liners.
Sift flour, baking powder, spices, and salt together, then set aside.
Using an electric mixer, beat the eggs and sugar for 1-2 minutes until eggs are light yellow. While still mixing very slowly pour in the melted butter and vanilla.
Mix in carrots till smooth.
Slowly mix in the dry ingredients. Adding in a little at a time, scraping the sides of the bowl as needed. Continue until all ingredients are well combined. Then fold in the walnuts.
Spoon cupcake batter into the prepared muffin tin. Bake for 15-18 minutes or until cupcakes are cooked through and a toothpick can come out clean. Cool completely on a rack before frosting.
With an electric mixer cream together the cream cheese and softened butter. Once combined add the vanilla and powdered sugar a little at a time. Mix until smooth. Pipe frosting onto cooled cupcakes.
Sprinkle cupcakes with walnuts.