I have been searching for a solution for two days now to setup Phonegap on my Windows 8.1 system without any success.
Whenever I try to install Phonegap through npm
I had a similar problem today too on Mac, even after Lorenzo said it should be all fine. Just running this:
sudo npm install -g phonegap
... produced loads of errors like this:
error: file ./objects/pack/pack-48c0ff4147fb7e8922546c4a857b98a1cb48e01f.pack is far too short to be a packfile
I combined Lorenzo and arpan shah's solutions:
sudo npm install -g phonegap@3.4
sudo npm cache clean
sudo npm update -g phone gap
... and it seemed to magically work.