Dreamliners had some nightmare problems with their batteries back when they first came out.
It was the first use of lithium ion chemistry on airplanes. The batteries kept catching on fire. At one point a battery fire started on a taxiway with a plane full of revenue passengers.
Boeing had to design a heavy, fireproof lock box to contain the batteries. It completely negated the weight savings from using lithium over NiCad and then some.
They also had a lot of manufacturing problems in the beginning trying to stop the carbon fiber from cracking.