Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

installing phonegap with npm 1.3.11 creates a Password: directory path on Mac OSX

On Mac 10.8.5, when I try installing Phonegap with

sudo npm install -g phonegap

or sudo-ing and running

npm install -g phonegap

I end up with

/Users/eric/Password:/usr/local/bin/phonegap ->    /Users/eric/Password:/usr/local/lib/node_modules/phonegap/bin/phonegap.js
[email protected] /Users/eric/Password:/usr/local/lib/node_modules/phonegap
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

My versions of bash, node and npm are

bash-3.2# node --version
v0.10.19
bash-3.2# npm --version
1.3.11

Is this something I can fix at the commandline, by adding switchings or exporting variables, or is there something wrong in npm?

Thanks.

like image 359
Eric Avatar asked Sep 30 '13 10:09

Eric


1 Answers

Turns out something set my prefix for npm incorrectly; still not sure of the culprit.

But to fix this, I had to make sure the prefix matched the broken installation path, and that I was in the parent directory for that path, again.

For example

cd /Users/eric
npm set prefix /Users/eric/Password:/usr/local
sudo npm uninstall phonegap -g
sudo rm -rf Password\:/

Then I set the prefix to the default for OSX and ran the install again

npm set prefix /usr/local 
npm install -g phonegap
like image 108
Eric Avatar answered Oct 07 '22 15:10

Eric