Carbon nanotube field-effect transistors (CNTFETs) produce band gap derived infrared emission under both ambipolar and unipolar transport conditions. We demonstrate here that heterogeneities/defects in the local environment of a CNTFET perturb the local potentials and, as a result, the characteristic bias dependent motion of the ambipolar light emission. Such defects can also introduce localized infrared emission due to impact excitation by carriers accelerated by a voltage drop at the defect. The correlation of the change in the motion of the ambipolar light emission and of the stationary electroluminescence with the electrical characteristics of the CNTFETs shows that stationary electroluminescence can identify "environmental defects" in carbon nanotubes and help evaluate their influence on electrical transport and device operation. A number of different defects are studied involving local dielectric environment changes (partially polymer-covered nanotubes), nanotube-nanotube contacts in looped nanotubes, and nanotube segments close to the electronic contacts. Random defects due to local charging are also observed.