Buying from AliExpress I've notice that the business to business site AliBaba and it's more consumer friendly AliExpress website have a number of bike components for sale. They tend to be complete component groupsets and the like but are some quite reasonable deals, especially if you are building a bike from scratch.

I've used AliExpress before to purchase electronic components, which have been good quality and are what they say on the tin. 

Has anyone used AliExpress to buy bike components and have they had any trouble? (quality, counterfeit etc.)

One benefit is that your money is held in escrow until you receive the item and aprove the payment so some safety.
Crapshoot. You may get something fantastic for your money, or you may get something that will leave you feeling burnt. Worse yet, you may get something that will fail catastrophically and get you really, really hurt. I have personally seen all scenarios play out with friends and former customers.
I recommend you try to find reviews for whatever parts you're looking at from folks who have owned the product for years- not months or weeks, or the "I just ordered it and when it gets here it's gonna be awesome!" guys.