Preheat oven to 350°F. Line a baking sheet with parchment paper. Set aside.
In a medium bowl, whisk together all of the dry ingredients. Set aside.
2½ cups all-purpose flour, 2 tablespoons cornstarch, 2½ teaspoons ground cinnamon, 1 teaspoon kosher salt, ¾ teaspoon baking soda, ¼ teaspoon baking powder, ¼ teaspoon ground cloves, ¼ teaspoon ground nutmeg, ¼ teaspoon ground ginger
In a large bowl, whisk the butter, brown sugar, and granulated sugar together until smooth and creamy. Add in the eggs, egg yolks, and vanilla and mix until smooth. Add in the flour mixture and stir just until the flour is incorporated. Fold in the shredded carrots and pecans.
1 cup unsalted butter, ⅔ cup brown sugar, ⅔ cup granulated sugar, 2 large eggs, 2 egg yolks, 1½ teaspoons pure vanilla extract, 1 cup shredded carrot, ½ cup chopped pecans
Using a cookie scoop for uniformity, scoop balls of dough onto the baking sheet. Be sure to space them about 1½ inches apart, as they will spread. Press down slightly to create a flatter shape. Place into the preheated oven to bake for 15 minutes or until the edges or golden brown and the center is baked through.
Once baked, remove from the oven and place onto a cooling rack to cool completely before frosting.
While the cookies are cooling, make the cream cheese frosting. Place all of the frosting ingredients, except the milk, in the bowl of a stand mixer fitted with a paddle or whisk attachment. Beat on high for 4 minutes or until smooth and creamy. If the frosting is too thick for your liking, slowly add in milk, a teaspoon at a time, until you have achieved the consistency you desire.
4 ounces cream cheese, 4 tablespoons unsalted butter, 3 tablespoons powdered sugar, 2 teaspoons pure vanilla extract, 3 tablespoons milk
Once the cookies have cooled, spread the frosting over the surface of the cookies. Sprinkle with chopped pecans if you so desire.