ReferenceError: node is not defined

Further, you say you want to wipe all node-red related stuff so you can start afresh, but presumably after you deleted your home folder and started again, when you first ran node-red you did not see the problem. If so then what good will uninstalling node-red do?