Preheat the oven to 350 degrees Fahrenheit. Line a muffin pan with 12 cupcake liners.
In a large bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, and nutmeg. Set aside.
Using a stand mixer, or a large bowl with a hand mixer, add the oil, brown sugar, and white sugar. Stir together until well combined.
Add the dry mixture to the sugar mixture, and stir it together.
Stir in the milk and vanilla extract. Then add in the eggs, one at a time, and stir until just combined.
Fold in the carrots, pineapple, and chopped nuts (if desired).
Scoop the batter into the prepared muffin tin, filling each liner about 3/4 full.
Bake the cupcakes for about 18-22 minutes, until an inserted toothpick comes out clean.
Let the cupcakes cool for 10 minutes in the pan, then transfer to a cooling rack to cool completely before frosting.
Scoop the frosting into a piping bag or a ziplock bag with your favorite frosting tip. I used tip 1A.