Preheat oven to 350 degrees Fahrenheit. Line a 12-cup muffin pan with cupcake liners and set aside.
In a large bowl, combine ½ cup granulated sugar, ½ cup light brown sugar, 2 large eggs, ¾ cup canola oil, and 1 teaspoon vanilla extract. Mix together using an electric hand mixer. Stir in 1 ½ cups shredded carrots
Add 1 ¼ cups all-purpose flour, 1 teaspoon baking powder, ½ teaspoon baking soda, ½ teaspoon salt, ½ teaspoon ground cinnamon, ¼ teaspoon ground ginger, ¼ teaspoon ground nutmeg, and ⅛ teaspoon ground cloves. Stir until everything is combined and be careful not to overmix the batter.
Divide the batter evenly between the 12 cupcake liners, filling each liner about ¾ full.
Bake for 18-22 minutes, just until the tops of the cupcakes bounce back to the touch. Test for doneness by inserting a toothpick into the center of a cupcake. It's done when the toothpick comes out clean with just a few crumbs. Cool completely before frosting.
Frosting
In a large bowl, add 1 (8-ounce) package softened cream cheese and ½ cup softened salted butter. Mix until light and creamy, about 3 minutes.
Add 1 teaspoon vanilla extract, ¼ teaspoon coconut extract, and 2 cups powdered sugar. Mix until smooth and combined.
Transfer the frosting to a piping bag fitted with a decorative tip and frost the cooled cupcakes. Sprinkle with ½ cup chopped pecans, if desired!