JP Ventura JP Ventura - 3 months ago 29
Node.js Question

Cordova and PhoneGap not working on Ubuntu 14.04

I installed Cordova and PhoneGap with npm:

sudo npm install -g cordova
sudo npm install -g phonegap

however, both return the same error message:

/usr/bin/env: node: No such file or directory


Create a shortcut is /usr/local (not /usr/bin):

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

According to The Linux Documentation Project, distributions may not install anything in there. It is reserved solely for the use of the local administrator.

This way he/she can be absolutely certain that no updates or upgrades to his distribution will overwrite any extra software he has installed locally.

If you are a full-stack developer requiring later features, I recommend installing the latest Node.JS according Ask Ubuntu instructions.

Remember that Ubuntu 14.04.5 LTS provides Node.JS v0.10.25 (stable).