Cordova and PhoneGap not working on Ubuntu 14.04

JP Ventura picture JP Ventura · Mar 15, 2014 · Viewed 12.2k times · Source

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

Answer

csantanapr picture csantanapr · Mar 16, 2014

it's not finding node or node lib on your path

There different solutions posted here:

https://github.com/joyent/node/issues/3911

A few: PATH:

appending /usr/local/bin:/usr/bin

putenv('PATH=' . getenv('PATH') . ':/usr/local/bin:/usr/bin');

Symlink:

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

Installing node legacy:

apt-get install nodejs-legacy