Preheat the oven to 350°F (175°C)
Grease and line a cake pan
Mix flour, baking powder, baking soda, salt, cinnamon, and nutmeg in a bowl
In another bowl, whisk eggs, sugar, oil, and vanilla
Stir the dry ingredients into the wet ingredients
Fold in grated carrots
Add chopped walnuts or raisins if desired
Pour the batter into the prepared pan
Bake for 30 to 40 minutes
Check doneness with a toothpick
Let the cake cool completely
Beat cream cheese, butter, powdered sugar, and vanilla to make frosting
Frost the cooled cake
Slice and serve
