Q:

npm install not finding package installed

I am installing a generator-phonegap that request the packaged phonegap that it is not finding. BUT I KNOW that is installed!
I tried to install globally
C:>npm install -g generator-phonegap
and that is the error:
npm ERR! notarget No compatible version found: phonegap@'>=3.1.0 <3.2.0'
npm ERR! notarget Valid install targets:
npm ERR! notarget ["4.2.0-0.26.0","5.0.0-0.27.0","5.0.0-0.27.1"]
npm ERR! notarget This is most likely not a problem with npm itself.
npm ERR! notarget In most cases you or one of your dependencies are request
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'generator-phonegap'

I have the version "5.0.0-0.27.1" of phonegap installed before.
Looks like that npm isnt checking the modules installed globaly
node-v.0.12 and npm-v 2.7.4

A:

According to npmjs.org, generator-phonegap was last published about a year ago.
According to the dependencies listed in its package.json, it requires phonegap 3.1.x. As far as I can tell, there is no published phonegap version that matches that. The closest is 3.1.0-0.15.0 but the - means that is a prerelease version. So it is "less than" 3.1.x. So, no dice.
I would avoid this generator because it does not appear to be actively maintained and the installation appears to be genuinely broken and not something weird about your system. But if you really want to play with it, clone it from the GitHub repo and manually update the phonegap requirement in package.json to something that exists. (Submit a PR to the repo if you do that!)

