A building that housed hazardous materials went up in flames in Stowe Township overnight.