Tesla said a defect could cause the electric truck to lose driver power and pledged to replace the affected part for free.