First things first, I assume you have downloaded your raspbian OS and burnt it on to an SD card that is booting properly on your pi zero W.
Then you have setup the pi to connect either to your local network or to a hotspot through your phone or PC. Basically you have internet access on your pi and you can ssh into it.
Ssh into the pi
then update and upgrade your system
sudo apt update && sudo apt dist-upgrade
Determine the architecture of your system
for the pi zero W, its ARMV6, download NodeJS from the website using wget
The URL of the download above will depend on the current version of node on the download page, so visit the page and copy the link location from the download link and replace in the command above
tar -xvf node-v8.11.1-linux-armv6l.tar.xz
then cd into the directory
Then install node
sudo cp -R * /usr/local/
Then confirm you have both node and npm installed properly
Then change to your working directory and test your node code