Step 1 of 11
Preheat the oven to 350°F.
Step 2 of 11
Line two 12-cavity cupcake pans with baking papers. Set aside.
Step 3 of 11
Place the canola oil, brown sugar, granulated sugar, eggs, crushed pineapple, and vanilla extract in a large mixing bowl. Whisk vigorously until smooth.
Step 4 of 11
Add the flour, cinnamon, pumpkin pie spice, baking powder, baking soda, and salt to the bowl. Continue whisking until mixture is just combined. Do not overmix. Fold in the shredded carrots, and the raisins and/or nuts, if using.
Step 5 of 11
Divide the batter evenly between the cupcake liners, filling each no more than 2/3 full.
Step 6 of 11
Bake the cupcakes on middle rack of oven just until a toothpick inserted in the center comes out clean, 18-21 minutes.
Step 7 of 11
Check to see that cupcakes are done. Remove from oven or add time as needed.
Step 8 of 11
Allow cupcakes to cool completely before frosting.
Step 9 of 11
While the cupcakes cool, make the frosting. Place the cream cheese and butter in a large mixing bowl. Beat with a hand mixer on medium speed until smooth and creamy.
Step 10 of 11
Add the powdered sugar in two additions, beating on low speed after each until sugar is fully incorporated into cream cheese mixture. Add the vanilla extract and salt to bowl. Continue beating on medium-high speed until frosting is light and fluffy, 2-3 minutes.
PRO TIP If the frosting is not stiff enough to pipe, add additional powdered sugar to reach desired consistency.
Step 11 of 11
Pipe or spread the frosting onto cooled cupcakes. Refrigerate until ready to serve.