Preheat oven to 350 F.
Line two cupcake pans for 24 cupcakes, or grease if you prefer not to use cupcake liners.
In a bowl, combine flour, baking powder, baking soda, cinnamon, ginger, nutmeg, cloves, and salt. Set aside.
With a whisk by hand or with a stand mixer, combine coconut oil, brown sugar, greek yogurt, eggs, and vanilla.
Slowly add shredded carrots and walnuts if using. Do not over mix! Just combine so carrots and walnuts are evenly spread out.
Batter should fill 2/3 of each cupcake. Bake for 13-15 minutes. Try not to over bake them! They shouldn't need more than 15 minutes.
Allow them to cool completely.