Must one move through the various jhanas to realise nibbana? Some of these jhanas are incredibly powerful but they have an opposite, that being emotional and mental upheaval and the dark nights.

Essentially, I realise that there are valuable insights to learn from both their extremes but I find that delusion can arise as part of the mental upheaval (I thought I was in love with my teacher) now that I'm out of the delusion it seems so silly.

Buddha had mentioned in a few suttas (I can't remember their names) that jhanas are the way to nibana but was this within the context of who he was giving the teaching to?

As an example, the satipathanna sutta was taught to the kuru people because they already possessed a deep wisdom and an advanced ability to learn quickly thus, the teaching he gave was conducive to their ability to attain higher levels of realisation very quickly.
Both Theravada and (Tibetan) Mahayana textual sources state that jhanas are not a hard requirement, but insight is.

That said, live teachers in both traditions clearly say that "insight" refers not as much to dry intellectual understanding as to practical real-life mastery of mind based on the first-hand insight into its key mechanisms.

In my understanding, jhanas ARE the stages of that mastery - especially if you interpret them broadly as stages of mastery of Emotional Intelligence - as opposed to concrete states. In this interpretation, nirvana/nibbana is a state of 100% inner harmony without any conflict between "is" and "should" whatsoever. While jhanas are progressive approximations of that state from coarse to finer, to finest, to transcendental.

The coarse stages entail coarser positive mindstates and coarser techniques of generating them - and the finer stages entail finer positive mindstates and finer techniques of generating them. If you look at it this way, you will see that jhanas are the very nature of the gradual path and are therefore required for anyone but the most talented practitioners who can skip to pure suchness right away.