Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
Last active August 13, 2018 21:29
Show Gist options
  • Save mohanpedala/e123184a3b472815676563e1a237da16 to your computer and use it in GitHub Desktop.
Save mohanpedala/e123184a3b472815676563e1a237da16 to your computer and use it in GitHub Desktop.
Node Installation on RHEL 7.*

Node Installation

  • Copy Tar file
  • Untar tar file
$ tar -xvf <file name>
  • Change name from node-v6.9.5-linux.**** to node-v6.9.5
$ mv node-v6.9.5-linux-x64 node
  • Set path
    1. open .bash_profile
    2. Add /node/bin path as shown below ($HOME=/local_home/user_name)
$ PATH=$HOME/node/bin:$PATH:$HOME/.local/bin
  • Logout and login
$ which node

Or

  • Run the below command to reload the profile
$ source ~/.bash_profile

Issue

  • npm -v

Error: module.js:471 / Error: Cannot find module 'npmlog'

Solution: Uninstall node and re-install it. Reason: npm has been corrupted.

  • gulp

Error: -bash: gulp command not found

$ npm uninstall --global gulp gulp-cli
$ rm /usr/local/share/man/man1/gulp.1
$ npm install --global gulp-cli
$ npm install -g gulp-cli

NPM update

npm i -g npm to update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment