Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova and PhoneGap not working on Ubuntu 14.04

Tags:

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
like image 722
JP Ventura Avatar asked Mar 15 '14 19:03

JP Ventura


1 Answers

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
like image 72
csantanapr Avatar answered Sep 23 '22 03:09

csantanapr