In a food processor, crush pecans or walnuts until they are tiny pieces. Set aside.
Next, blend carrots in the food processor to make them finely shredded. Dry them with a paper towel and set aside.
In a large mixing bowl, beat together butter, cream cheese, and both sugars. Add vanilla and egg.
Add flour, cornstarch, cinnamon, baking soda, baking powder, salt, and nutmeg and mix. Add carrots and pecans and mix until just combined.
Line a baking sheet with parchment paper or a silicone baking mat. Do not use nonstick spray. It will cause cookies to spread. Use a 1.5 tablespoon cookie scoop and add mounds of cookie dough onto the baking sheet.
Refrigerate cookie dough for 1 hour. This prevents cookies from spreading as they bake.
Preheat the oven to 400℉. Place the baking sheet directly from the fridge into the oven and bake for 11-13 minutes. The tops should be set, and the center of the cookies should be slightly underdone. They will firm as they cool.
Cream Cheese Frosting
Whip butter and cream cheese in a mixing bowl for 5 minutes until light and fluffy. Add vanilla and slowly add powdered sugar until blended. Add 1-2 tablespoons of milk until reaching the desired consistency.
Use a 1-tablespoon cookie scoop or a spoon to add a dollop of frosting to the top of each cookie. I recommend chilling the frosting in the fridge before frosting the cookies. It makes it easier to use a cookie scoop. Sprinkle with additional chopped pecans or walnuts.