Carrot Cake Bars with Cream Cheese Frosting

INGREDIENTS:
2 cups all-purpose flour
1 ½ teaspoons baking powder
1 teaspoon baking soda
½ teaspoon salt
1 teaspoon ground cinnamon
½ teaspoon ground nutmeg
½ teaspoon ground ginger
½ cup unsalted butter, softened
1 cup granulated sugar
½ cup brown sugar
3 large eggs
1 teaspoon vanilla extract
2 cups grated carrots
½ cup crushed pineapple, drained
½ cup chopped walnuts (optional)
Frosting:
8 ounces cream cheese, softened
¼ cup unsalted butter, softened
2 cups powdered sugar
1 teaspoon vanilla extract
DIRECTIONS:
Preheat the oven to 350°F (175°C) and grease a 9×13-inch baking pan. In a bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
In a large mixing bowl, cream the softened butter, granulated sugar, and brown sugar until light and fluffy. Add the eggs one at a time, mixing well after each, then stir in the vanilla. Gradually add the dry ingredients and mix until just combined. Fold in the grated carrots, crushed pineapple, and walnuts, if using.
Pour the batter into the prepared baking pan and spread evenly. Bake for 25 to 30 minutes, or until a toothpick inserted in the center comes out clean. Allow the cake bars to cool completely in the pan …