Preheat the oven to 350°F (175°C). Line the bottom of a 9x13 inch baking pan with parchment paper and lightly grease the sides.
In a large mixing bowl, whisk together the flour, granulated sugar, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
In a separate bowl, beat the eggs and vegetable oil together until well combined. Add the grated carrots and crushed pineapple, stirring to mix.
Gradually add the wet ingredients to the dry ingredients, mixing until just combined. If desired, fold in the chopped walnuts.
Pour the batter into the prepared baking pan, smoothing the top with a spatula. Bake in the preheated oven for 35-40 minutes, or until a toothpick inserted in the center comes out clean.
While the cake is baking, prepare the cream cheese frosting. In a mixing bowl, beat the softened cream cheese and butter until smooth and creamy.
Gradually mix in the powdered sugar and vanilla extract until fully combined.
Once the cake is cool, spread the cream cheese frosting evenly over the top. Optionally, sprinkle additional chopped walnuts on top for decoration.
Slice and serve the cake. Enjoy!