NPM Error: node: not found

I tried to install a package (slap) via npm. For this, you have to install nodejs (may be through the package-manager). And I ran the following command npm install and got errors. One of those was node: not found. Here is the complete error:

○ → sudo npm install -g slap@latest
[sudo] password for mandeep: 
/usr/local/bin/slap -> /usr/local/lib/node_modules/slap/slap.js

> runas@3.1.1 install /usr/local/lib/node_modules/slap/node_modules/runas
> node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-22-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/slap/node_modules/runas
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
`-- (empty)

npm ERR! Linux 4.4.0-22-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "slap@latest"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2

npm ERR! runas@3.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the runas@3.1.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs runas
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/mandeep/npm-debug.log
npm ERR! code 1

To solve this, I created a symlink /usr/bin/nodejs to /usr/bin/node and it worked fine. Here is it how to do that:

sudo ln -s /usr/bin/nodejs /usr/bin/node


Adding Android-x86 to grub menu

Approximately one and half years ago I wrote a post about installing Android x86 on PC. You may find here the post:

I used grub-customizer to manage my grub. Here is how to add a new entry to show android in the grub menu. Add a new entry.

See more about grub-customizer in the following link.

Add following information as shown in the right hand side of the image.


Just in case, if you are looking to copy paste the source lines then:

insmod ext4
set root='(hd0,8)’
search –no-floppy –fs-uuid –set d8c2350c-037b-4e56-8c9f-b52a6807eef7
linux /android-4.4-RC1/kernel quiet root=/dev/ram0 androidboot.hardware=android_x86 video=-16 SRC=/android-4.4-RC1
drivemap -s (hd0) ${root}
chainloader +1
initrd /android-4.4-RC1/initrd.img


The lines written above highly depends upon the installation of your android os like partition name etc. that’s why I recommended to read the previous post to relate things. Ask if something is unclear.

SimpleScreenRecorder for recording screen

SimpleScreenRecorder is a tool that can be used to record the video of the screen. Audio can also be recorded. There are several recording options like full screen recording or selective area, window etc. Just browse to the location to which you want to store the video. Then start video recording. It can also be paused in between. The default shortcut is: Ctrl+R. After you are finished with recording, don’t forget to click the ‘Save recording’ button at the bottom. Now add the ppa to your system:

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder

Now install it using:

sudo apt-get update && sudo apt-get install simplescreenrecorder

It has very good performance. Fast rendering of video. No glitches. Nice tool.

Update: If the audio recording doesn’t work, you should select the ‘Source’ of audio to Built-in Audio Analog Stereo. simpescr

Day 1

Today I joined my 6-month training at TCC (Testing and Consultancy Cell), GNDEC, Ludhiana. Today I noticed one of my friend’s laptop was running too slow and he was irritated because of this. He was using Ubuntu with unity as desktop environment. So I asked him the configurations of his laptop and it was 1 GB RAM. And it seemed to me the root cause of the problem.

I searched about light weight desktop environments and found this post:

So I advised him to install xfce.


For this, there is a command:

sudo apt-get install xubuntu-desktop

After installing, when he restarted then xubuntu spash screen appeared but again unity was started. So the next command is to remove unity and some related packages as given in above link.

sudo apt-get autoremove --purge unity unity-common unity-services unity-lens-\* unity-scope-\* unity-webapps-\* gnome-control-center-unity hud libunity-core-6\* libunity-misc4 libunity-webapps\* appmenu-gtk appmenu-gtk3 appmenu-qt\* overlay-scrollbar\* activity-log-manager-control-center firefox-globalmenu thunderbird-globalmenu libufe-xidgetter0 xul-ext-unity xul-ext-webaccounts webaccounts-extension-common xul-ext-websites-integration gnome-control-center gnome-session

Other options are: LXDE, MATE.

Disable Bluetooth on Startup in Ubuntu

If you don’t use wireless mouse or keyboard and disable your bluetooth manually everytime Ubuntu starts up (and hate it), then you need to automate this.

You can do it by editing a file i.e.  /etc/rc.local

You need root permissions to edit this file. From terminal (Ctrl+Alt+T) type:

gksu gedit /etc/rc.local

Here gksu is a front-end to su.

Then add the following line before  ‘exit 0’:

rfkill block bluetooth

Here is how the file will look like:

gksu gedit /etc/rc.local

gksu gedit /etc/rc.local

This will soft block the bluetooth service.

You can unblock it anytime by:  rfkill unblock bluetooth.

rfkill is a utility that is meant for disabling and enabling wireless devices.

How to share folder between Windows XP(running on VM) and Ubuntu

After having all things set up i.e. Installing VirtualBox, Installing OS on VirtualBox, you might have wondering how to share something between Ubuntu(Primary OS) and XP(on VM). For this we need to install Guest Additions image.
For this, after running XP in VM, go to Devices menu on the top and select ‘Insert Guest Additions CD image’ and it will ask you for downloading it.

v1 So download it (size around 65 MB) and reboot if it don’t appear in the My Computer yet.
Now it will appear in the My Computer. Then double click on that and install it.



Now click on Settings > Shared Folders > Machine Folders and select a folder(may create a new one like below).



Then tick on ‘Auto-mount’ and ‘Make Permanent’ if you want to mount it everytime you start the VirtualBox.

v3Click OK. You’ll find a drive like icon that will point to the ‘shared’ folder in Ubuntu.

v8You can check the sharing by creating a new file in that folder and accessing that from Ubuntu..






Installing RAINLOOP

RAINLOOP is Simple, modern & fast web-based email client. An email client, email reader or more formally mail user agent (MUA) is a computer program used to access and manage a user’s email.


download rainloop

Create a new directory named rainloop:

mkdir /var/www/rainloop


Extract the downloaded zip file:

unzip -d /var/www/rainloop


Grant read/write permissions required by the application:

cd /var/www/rainloop
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;


Set owner for the application recursively:

cd /var/www/rainloop
chown -R www-data:www-data .


You’ll need to create database and do some configuration settings. Please check the official rainloop website for more details.

Now go to the browser and enter localhost/rainloop and you’ll be greeted with rainloop authentication.

Now if you have 2 step verification activated on Gmail then you can go to the page:

and then create a new authentication code for your application. Copy this code and paste it in the password field of rainloop and in enter your email too.

The view of settings:

rainloop settings