Preheat oven to 350°. In a large bowl, combine flour, sugar, coconut, baking soda, salt, and spices; stir well with a whisk.
In a medium bowl, combine oil, eggs, and vanilla; stir well. Add grated zucchini and pineapple; mix well. Fold wet ingredients with the dry ingredients, batter will be stiff and dry but keep folding it and it will all come together.
Spoon batter into cupcake tin. Bake at 350° for about 23 minutes, or until a wooden toothpick inserted in the center comes out clean. Cool completely on a wire rack.
To prepare frosting, beat together cream cheese, powdered sugar and vanilla until smooth. Spread or pipe frosting over the cupcakes once they are cooled. Garnish with chopped pecans or walnuts, if desired.
Enjoy!