Preheat the oven to 350°F (180°C), or 160°C if using a fan oven. Line three baking sheets with parchment paper and set aside.
In a medium bowl, whisk together the flour, cinnamon, ginger, nutmeg, baking powder, baking soda and salt; set aside.
In a separate bowl or bowl of a stand mixer fitted with the paddle attachment, cream together the butter, brown sugar, and granulated sugar until smooth and creamy, about 2 minutes. Add the eggs and vanilla and mix until combined.
Add the flour mixture to the butter mixture and mix well. Stir in the carrots and pecans if using. Dough will be very thick and sticky.
Use a small (1.5 tablespoon) cookie scoop to drop dough onto the prepared baking sheets 2” apart and bake in the preheated oven for 10-12 minutes, or until the cookies are puffed and no longer wet on top.
Allow the cookies to cool for 5 minutes before transferring to a wire rack to cool completely.
Prepare the frosting by creaming together the cream cheese, butter, and powdered sugar until smooth. Mix in the heavy cream and the vanilla until well combined. Spread a generous amount of frosting (1.5-2 tablespoons) over the cooled cookies
Divide the remaining frosting into two, then add one drop of green food coloring to one bowl, and one drop of orange food coloring to the other and mix well.
Pipe carrots using the orange and green frosting on top of the cookies
Notes
Use freshly shredded carrots. For the best flavor and texture, peel and then grate the carrots yourself, rather than buying pre-shredded carrots. These can be dry and are often too thick for making carrot cake.
Make them nut-free. Walnuts or pecans are traditional in carrot cake and delicious in these cookies, but they can be omitted.
Use softened butter and cream cheese. For both the cookie dough and the frosting, you want to start with soft room temperature butter. I suggest letting the butter soften at room temperature, as the microwave will often melt the butter or make it too soft to work with. I'll give the same advice about cream cheese - make sure it's soft before trying to make frosting with it!
To Store: Keep these cookies in a single layer in an airtight container in the fridge for up to 2 days.