Download and install Node.JS.

Install Surge by running from your terminal:
npm install --global surge (for windows)
or sudo npm install --global surge (mac)