Installing NPM/NodeJS on CentOS is a nightmare

Have been trying for a few hours to install node on CentOS 7.7 to no avail. Cmon guys yum install node/nodejs/npm should just work.

  • yum install node No package node available.
  • yum install nodejs No package nodejs available.
  • yum install nodejs12 No package nodejs12 available.
  • yum list *node*: Nothing related to nodeJS/NPM
  • sudo yum -y install nodejs npm: No package nodejs available. No package npm available.
  • curl -L -k | sh: Failed to download script
  • Every other googled technique -> fail
  • Guidance on for CentOS (yum install nodejs12) -> nope, see above

Whatโ€™s a boy to do?

Workaround for now:

curl -Lk | bash
n 12.13.0

To make node and npm globally available (to any user):

sudo ln -s ~/n/n/versions/node/12.13.0/bin/node /usr/bin/node
sudo ln -s ~/n/bin/npm /usr/bin/npm


node -v

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.