Butter your cupcake pan or and line with cupcake papers.
Preheat the oven to 350°F (180°C).
If using nuts, toast them in a 350°F (180°C) oven for about 5 minutes, until golden and fragrant.
If using a stand mixer, using the whisk attachment, mix the eggs on low until combined. Add the sugar and turn speed to medium-high. Mix until the batter is smooth and pale.
Slowly beat in the oil, scraping the sides of the bowl, so it is evenly blended.
Sift together the flour, baking soda, cardamom, cinnamon, fennel, nutmeg, cloves, and salt and add to the egg and sugar mixture. Beat on medium-low just until it is combined.
Stir in the carrots (and coconut, raisins, and nuts if using) and spoon the batter into the cupcake pan. Don't overfill the cups; slightly over half full or 37 grams is perfect. You will have more than 12 cupcakes i
Bake until the cupcakes are firm to the touch and a toothpick inserted into the center comes out clean. About 12 to 15 minutes.
Let the cupcakes cool on a baking rack. Cool completely before frosting, about 45 minutes to 1 hour.
Cream Cheese Frosting ~ One Cup Frosting
Take the cream cheese and butter out of the refrigerator at least an hour before you want to frost the cake. This can even be done the night before. If you forgot this step, cut the cream cheese into 1-inch cubes and lay out on a microwave-safe plate. Heat in 10-second increments just until softened, not melted.
Gather your frosting ingredients.
Using a stand or hand mixer, mix the butter and cream cheese until light and fluffy; about 3 minutes on high speed.
Add icing sugar 1/2 cup at a time. Add the spices if using (see Notes below), salt, lemon juice, or rose water, or vanilla. Mix until combined. For ideas on how to thin or thicken your frosting see the Notes below.
Frost and decorate as you wish. The frosting will keep at room temperature for 3 days, in the refrigerator for a week, or in the freezer for several months.
If you prefer to make a two-layer cake 8-inch cake, double the cupcake recipe and use frosting measurements for 16 ounces of cream cheese, or 4 times the frosting recipe.
If you add in pineapple and/or nuts you will have another 4 or more cupcakes. Not to bad a problem I think.
Thin to medium carrots have the best flavor.
Measuring the flour: I encourage you to weigh your flour because this recipe works best with 142 grams of flour per cup. Sadly, one cup of flour is anywhere from 125 grams to 142 grams, depending on whose recipe you are using. If you fluff the flour, spoon the flour into a measuring cup, then level you get a cup that is approximately 130 grams, which too light for this recipe. If this is the way you measure your flour and you don't have a scale, you will want to add in 3 tablespoons of flour.
To hasten the cooling of the cupcakes before frosting, you can pop them in the refrigerator. Make sure the cupcakes are cool throughout, however, and not just on the surface.
Frosting tips: add more icing sugar if the frosting is too soft. If the icing is sweet enough and you still need to firm it up, use 1/2 a tablespoon, or at the most, 1 tablespoon of cornstarch. You can also pop it into the fridge for 20 minutes. And if the frosting is too thick add a splash of milk or cream