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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With