How do I get rid of this error on windows build? It's even commented out!!!!!!

I am making a game and it runs fine with no errors. However, when I build to windows it gives the following errors. This is adjusting the audio levels in the mixer.

.----------------

NullReferenceException: Object reference not set to an instance of an object
MenuSliderSFX.Awake () (at Assets/01-Scripts/MenuSliderSFX.cs:28)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


In the following script the line is void Awake()
mixLevels_CLASS = mixLevels_GO.GetComponent();


So maybe the item that the following points to is wrong or something.
public GameObject mixLevels_GO;
MixLevels mixLevels_CLASS;


It’s weird that normally there is no error but on when exporting to a final build it shows up.
.
//////////////////////////////////////////////////////////////////////////
using UnityEngine;
using UnityEngine.UI;

//////////////////////////////////////////////////////////////////////////
[ExecuteInEditMode]
public class MenuSliderMusic : MonoBehaviour
{
    //////////////////////////////////////////////////////////////////////////
    //VARIABLES
        public Slider volumeSlider;
        public Text text;
        public string displayThisAfterNumber = "%";
        public byte numberOfDecimalPlaces = 0;

        static public float soundMusicVolume = 0.0f;

        public AudioClip audioSound;
        public AudioSource audio2;

        public UnityEngine.Audio.AudioMixer masterMixer;

        public GameObject mixLevels_GO;
        MixLevels mixLevels_CLASS;
    //////////////////////////////////////////////////////////////////////////
    void Awake()
    {
        mixLevels_CLASS = mixLevels_GO.GetComponent<MixLevels>();

        audio2 = GetComponent<AudioSource>();

        if (PlayerPrefs.HasKey("PP-soundMusicVolume"))
        {
            soundMusicVolume = PlayerPrefs.GetFloat("PP-soundMusicVolume");
        }
        else
        {
            PlayerPrefs.SetFloat("PP-soundMusicVolume", soundMusicVolume);
            PlayerPrefs.Save();
        }
        volumeSlider.value = soundMusicVolume;

        masterMixer.SetFloat("musicVol", soundMusicVolume);
    }

    //////////////////////////////////////////////////////////////////////////
    void OnEnable()
    {
        audio2 = GetComponent<AudioSource>();

        if (PlayerPrefs.HasKey("PP-soundMusicVolume"))
        {
            soundMusicVolume = PlayerPrefs.GetFloat("PP-soundMusicVolume");
        }
        else
        {
            PlayerPrefs.SetFloat("PP-soundMusicVolume", soundMusicVolume);
            PlayerPrefs.Save();
        }
        volumeSlider.value = soundMusicVolume;

        volumeSlider.onValueChanged.AddListener(ChangeValue);
        ChangeValueOnEnable(soundMusicVolume);
    }
    //////////////////////////////////////////////////////////////////////////
    void OnDisable()
    {
        volumeSlider.onValueChanged.RemoveAllListeners();
    }
    //////////////////////////////////////////////////////////////////////////
    void ChangeValueOnEnable(float value)
    {
        text.text = value.ToString("n" + numberOfDecimalPlaces) + " " + displayThisAfterNumber;
        soundMusicVolume = volumeSlider.value;
    }
    //////////////////////////////////////////////////////////////////////////
    void ChangeValue(float value)
    {
        text.text = value.ToString("n" + numberOfDecimalPlaces) + " " + displayThisAfterNumber;
        soundMusicVolume = volumeSlider.value;

        audio2.PlayOneShot(audioSound, 1.0f);
    }
    //////////////////////////////////////////////////////////////////////////
    public void SaveSoundMusicPrefs()
    {
        PlayerPrefs.SetFloat("PP-soundMusicVolume", soundMusicVolume);
        PlayerPrefs.Save();
    }
    //////////////////////////////////////////////////////////////////////////
    public void ResetMusicVolume()
    {
        soundMusicVolume = 0.0f;
        volumeSlider.value = soundMusicVolume;
        ChangeValueOnEnable(soundMusicVolume);

        SaveSoundMusicPrefs();
    }
    //////////////////////////////////////////////////////////////////////////
    public void MuteMusicxVolume()
    {
        soundMusicVolume = -80.0f;
        volumeSlider.value = soundMusicVolume;
        ChangeValueOnEnable(soundMusicVolume);

        SaveSoundMusicPrefs();
    }
    //////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////
    public void IncreaseMusicVolume()
    {
        soundMusicVolume = soundMusicVolume + 1.0f;
        volumeSlider.value = soundMusicVolume;
        ChangeValue(soundMusicVolume);

        mixLevels_CLASS.SetMusicLvl(soundMusicVolume);

        SaveSoundMusicPrefs();
    }
    //////////////////////////////////////////////////////////////////////////
    public void DecreaseMusicVolume()
    {
        soundMusicVolume = soundMusicVolume - 1.0f;
        volumeSlider.value = soundMusicVolume;
        ChangeValue(soundMusicVolume);

        mixLevels_CLASS.SetMusicLvl(soundMusicVolume);

        SaveSoundMusicPrefs();
    }
    //////////////////////////////////////////////////////////////////////////
}

I think you need to drag the AudioSource in the field AudioSource on Inspector. I think it will solve the problem.

I’m not sure why it was fixed but it is. I tried a number of things. I did exit out of visual studio and then do the build. Before I was building to windows and had visual studio open. the weirdest part was the errors even after I commented out the errors. However, sense the errors did not pop up in the editor until the windows build, this makes sense. Or at least the most sense.

Thanks for the help all.