Chances are, you didn’t use the bricks of full-fat cream cheese.  Another reason could be because your butter and cream cheese were too warm.  Make sure they are soft but NOT melted when you make the frosting.    The easiest fix is to cover the bowl and toss it into the fridge for about 30 minutes to chill it back down, then remove and mix again.