If you only have one romex cable in your
switch box, all you have at the switch
sight is a switch loop. One of the conductors would be hot at all times. Only with the switch installed and on would the light work.