Preheat the oven to 350°F (175°C). Grease and flour a 9x13 inch pan.
Mix dry ingredients (flour, baking powder, baking soda, salt) in a bowl.
Beat eggs and sugar in a large bowl until smooth. Add oil, vanilla, grated carrots, and drained pineapple; mix well.
Add dry ingredients to wet ingredients. Stir gently to combine. Fold in coconut and nuts if using.
Pour batter into the prepared pan and bake 40-45 minutes or until a toothpick comes out clean.
Cool completely before frosting
Make frosting by beating cream cheese and butter until smooth. Add powdered sugar and vanilla; beat until creamy.
Spread frosting evenly over cooled cake. Sprinkle extra coconut or nuts on top if you like.