- 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
- open .bash_profile
- 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
- 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 i -g npm to update