America is struggling to build ships, missiles and drones, even as war rages in eastern Europe and tensions rise in Asia.