Preheat oven to 350 F. (You can start it now or while you're chilling the dough, but make sure you give yourself time to fully pre-heat)
Line sheet-pans with parchment paper.
Beat butter and brown sugar in a large bowl by hand or with an electric stand mixer or hand mixer.
Add the eggs and beat till incorporated, then add the carrots, pineapple and vanilla extract.
Add the flour, baking powder, baking soda and spices and whisk to combine.
Fold in the dry ingredients (flour mixture), and the raisins if you opt to add them, into the wet ingredients (carrot mixture) and stir until there are no more dry spots. Make sure to scrape the sides of the bowl really well to get every bit of flour mixed in.
Next, for best results, Chill the cookie dough for 15-30 minutes. (You may skip this step but I find that the cookies keep their shape better and won't spread out as much if you do this.)
After chilling the dough, use an ice cream scoop or such to scoop out about 2 Tbsp. scoops onto the prepared baking sheets about 2 inches apart.
Bake cookies in your preheated oven for 15 minutes or until tops are golden and set.
Remove from the oven and let the cookies sit for 3-5 minutes and then transfer to wire racks to cool completely. Preferably use wire racks that you are ok for frosting the cookies on.
Let the cookies cool completely to touch (At least 15-30 mins)
While they're cooling you can make your frosting: Beat the cream cheese, butter, powdered sugar and vanilla until it's a smooth consistency with no lumps. If it's too thick, add ½ Tablespoon of water and adjust to a touch more if need be.
Frost the tops of the cookies with a generous shmear and then sprinkle some crushed pecan, walnuts or sprinkles. ( You will have extra frosting)