11

Hey I'm following the instructions of phoneGap and while using the following command in terminal

sudo npm install -g phonegap

I get the following errors

npm ERR! registry error parsing json

and

npm ERR! fetch failed https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm ERR! fetch failed https://registry.npmjs.org/node-static/-/node-static-0.7.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/cordova/-/cordova-3.1.0-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/phonegap-build/-/phonegap-build-0.8.4.tgz

and

npm ERR! network socket hang up
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Darwin 13.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/kaldenficklin
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/kaldenficklin/npm-debug.log
npm ERR! not ok code 0

I downloaded node.js before hand like instructed to. Can anyone tell me what i'm doing wrong and how to fix it??

6
  • A colleague is having the same issue. It seems likely that there are issues on NPM registry's side.
    – chazzlabs
    Nov 4, 2013 at 19:18
  • We're also seeing the issue - wonder if there any way to alert NPM Registry maintainers?
    – jonmc12
    Nov 4, 2013 at 19:59
  • Yeah I'm also having an issue installing pretty much anything through NPM right now, and by the looks of their site it's currently down. Nov 4, 2013 at 20:05
  • same for me, bunch of error parsing json and the like Nov 4, 2013 at 20:20
  • I am having the same problem. Been having it all day.
    – Rydell
    Nov 4, 2013 at 20:36

2 Answers 2

25

As mentioned here https://stackoverflow.com/a/13119867/1955071, please use following command and then install phonegap,

npm config set registry http://registry.npmjs.org/

Afterwards, in case you get this error "Error: No compatible version found: phonegap" then add force flag to install it,

sudo npm install -gf phonegap
0
0

I don't know if we have the same problem, but I update the node.js and phonegap have installed without problem, try it!

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.