Preheat oven to 350°F. Line two standard muffin tins with paper liners (recipe makes about 20 cupcakes).
In the bowl of a stand mixer fitted with the paddle attachment, combine granulated sugar, vegetable oil, vanilla extract, and eggs. Beat on medium-low speed until the mixture turns light yellow and well blended, about 3 minutes.
In a separate medium bowl, sift together the all-purpose flour, ground cinnamon, nutmeg, baking soda, and kosher salt.
With the mixer on low speed, gradually add the dry ingredients to the wet mixture. Mix just until combined; avoid overmixing.
Add the chopped walnuts, grated carrots, and crushed pineapple. Continue mixing on low speed until evenly distributed.
Scoop the batter into the prepared liners, filling each about ¾ full for a nice domed top.
Bake for 24 minutes, or until the tops are golden brown and a toothpick inserted in the center comes out clean or with a few moist crumbs.
Transfer the muffin tins to a wire rack. Let cupcakes cool in the tins for 5 minutes, then gently remove them to the rack to cool completely before frosting.
While the cupcakes cool, prepare the frosting: In the bowl of a stand mixer (or using a hand mixer), beat the cream cheese, butter, and vanilla extract on medium speed for 1-2 minutes until smooth and fully incorporated.
Add the confectioners' sugar one cup at a time, mixing well after each addition. Continue until the frosting is light, creamy, and spreadable.
Spread or pipe the frosting generously onto the cooled cupcakes.