Syntax error: newline unexpected node.js rpm

I am running node.js on my Linux Debian server and am having problems running a .sh script trying to install RPM.

The command is:
curl http://npmjs.org/install.sh | sh

The script is a supported install RPM package.

-bash: sh: Syntax error: newline unexpected

Can anyone help me fix this?

Use this:

curl -k https://npmjs.org/install.sh | sudo sh

Note: npm included in new versions of node.js. No need to install it separately now.

Try:

curl -O https://www.npmjs.org/install.sh
sudo sh install.sh

Inspired by this.