Basic buttons on webpage working but in the node console each one throws and error