Preheat oven to 350°.
To prepare cake, lightly spoon flour into dry measuring cups; level with a knife. Combine flour, sugar, coconut, baking soda, salt, and spices in a large bowl; stir well with a whisk.
Combine oil, eggs, and vanilla; stir well. Stir egg mixture, grated zucchini, and pineapple into flour mixture. Batter will be stiff and dry but keep folding it and it will all come together. If it still seems too dry, just add a little splash of the pineapple juice.
Spoon batter into a 13 x 9-inch baking pan coated with cooking spray. Bake at 350° for about 33-35 minutes or until a wooden pick inserted in the center comes out with moist crumbs and cake is pulling away from sides of pan. Cool completely on a wire rack.
To prepare frosting
combine butter and cream cheese in a large bowl. Beat with a mixer at medium speed until smooth. Beat in powdered sugar and pineapple juice just until smooth. Add a splash of milk or more pineapple juice if necessary (I didn’t need any). Spread frosting over top of cake. You can garnish with chopped pecans or walnuts (Right before serving), if desired.
If your zucchini are huge, scrape the seeds out of the center before you shred it so it’s not too watery.
And this recipe can be turned into a Carrot Cake just by substituting shredded carrots for the zucchini.