Preheat the oven to 160°C (fan forced). Line 2 12-hole cupcake pans with cupcake liners.
In a bowl, add the brown sugar, oil, and eggs, and whisk until combined. Add the flour, baking soda, spices, and whisk to form a batter.
Using a spatula, fold in the grated carrot, followed by the chopped walnuts.
Evenly divide the mixture into the cupcake pans.
Bake for 24-26 minutes until a toothpick inserted comes out clean. Remove from the pans onto a cooling rack and let them cool completely.
To make the icing, add the cream cheese and butter into a bowl and beat until well combined. Add the icing sugar mixture and vanilla and beat until the mixture is smooth.
When the cupcakes are cool, pipe the icing on with your favourite piping tip and top with extra walnut pieces.