Preheat the oven to 180C/350F/Gas 4, and line a baking tray with parchment paper, or a silicone mat. Set aside.
Whisk together the flour, baking soda, cornflour, spices, and salt. Set aside.
Whisk together the melted butter and sugar until combined. Add the vanilla, and mix until combined.
Add the dry ingredients, and mix until just combined. Fold in the grated carrots (squeeze the moisture from the grated carrots beforehand).
Roll the dough into 1oz balls, and place onto the prepared baking tray. Bake for 10 - 12 minutes.
Allow to cool on the baking tray for 10 minutes before transferring to a wire rack to cool completely.
For the Frosting
Beat together the cream cheese and butter until smooth and creamy. Add the icing sugar and vanilla, and beat until smooth and spreadable.
Spread the frosting over the cooled cookies, and top with chopped walnuts or pecans (optional).
Video
Notes
Cookies stay fresh, kept in an airtight container, at room temperature or in the fridge for up to 1 week. Cookie dough balls can be kept in the fridge for up to 5 days, or frozen for up to 3 months. Bake from frozen.