1

I'm following the step on the homepage of cordova, but I am confuse at first step! I typed sudo npm install -g cordova in terminal, but it stuck

loadDep:xtend → network ▌ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟

It takes hours but no further progress. Actually, I'm in China and I guess it may be caused by network issue. But I turn VPN on and I'm able to visit Google. Then, I have no idea what to do now. Please give me some hints, thanks!

Henry Yong
  • 97
  • 11
  • try `-d` or `--verbose` flag for more info – laggingreflex Dec 06 '15 at 14:23
  • I use `-d` this time, and there are many timeout occurred. It still stuck at here: npm http request GET https://registry.npmjs.org/hash.js npm http 200 https://registry.npmjs.org/hash.js loadDep:hash.js → network ▌ ╢████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟ – Henry Yong Dec 06 '15 at 16:04

2 Answers2

1

use this command in command prompt:

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

change the configuration its work for me

Ehsan
  • 604
  • 7
  • 21
1

use this command in command prompt

npm set registry https://registry.npmjs.org/

and then try to install it again using the below command

npm install -g cordova@latest
Jeffrey Rajan
  • 4,391
  • 4
  • 27
  • 37