This work provides new evidence on the structural change processes undertaken by countries trapped in the middle-income trap (MIT) by applying a comprehensive approach, from both the supply and the demand sides. First, it provides evidence that there is a regular trapping mechanism, determined by the interaction between external demand constraints and the level of complexity of the economies. External constraint operates since MIT countries depend on exogenous prices to grow. Meanwhile, that constraint relaxes as the complexity of production increases. Second, it presents a novel identification of the MIT countries trajectories using indicators of economic complexity. A typology of the varieties of MIT is built according to the level of complexity of national economies and the relatedness between their current productive structure and more complex goods. It shows that having reached certain levels, further increases in supply complexity require a deepening of structural change through unrelated diversification.