Preheat oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan.
Whisk together flour, baking soda, cinnamon, nutmeg, ginger, cloves, and salt.
In a separate bowl, whisk together sugar, oil, eggs, and vanilla.
Gradually add dry ingredients to wet ingredients, mixing on low speed until just combined.
Fold in carrots and nuts (if using).
Pour batter into prepared pan and bake for 30-35 minutes, or until a wooden skewer inserted into the center comes out clean.
Let cool completely before frosting.
For the frosting, beat together cream cheese and butter until smooth. Gradually add powdered sugar and vanilla, beating until light and fluffy. Frost the cooled cake.