Ukraine started in 2014. Libya in 2011. The truth of the world was already clear at that point, as well as Iranian intentions. The JCPOA was never going to handle a Iranian nuke but would have facilitated it. You cannot use economic incentives to fix a broken world, and Iran had many other motives for nukes.