简体   繁体   English

npm install找不到安装的软件包

[英]npm install not finding package installed

I am installing a generator-phonegap that request the packaged phonegap that it is not finding. 我正在安装一个generator-phonegap,它请求找不到的打包的phonegap。 BUT I KNOW that is installed! 但我知道已安装!

I tried to install globally C:>npm install -g generator-phonegap 我试图全局安装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. 我之前安装了phonegap版本“ 5.0.0-0.27.1”。

Looks like that npm isnt checking the modules installed globaly 看起来npm没有检查全局安装的模块

node-v.0.12 and npm-v 2.7.4 node-v.0.12和npm-v 2.7.4

According to npmjs.org , generator-phonegap was last published about a year ago. 根据npmjs.orggenerator-phonegap发布时间大约是一年前。

According to the dependencies listed in its package.json , it requires phonegap 3.1.x. 根据其package.json列出的依赖项,它需要phonegap As far as I can tell, there is no published phonegap version that matches that. 据我所知,没有phonegap匹配的已发布phonegap版本。 The closest is 3.1.0-0.15.0 but the - means that is a prerelease version. 最接近的是3.1.0-0.15.0但是-表示是预发行版本。 So it is "less than" 3.1.x. 因此它小于“ 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. 但是,如果您真的想使用它,请从GitHub存储库中克隆它,然后 package.jsonphonegap要求手动更新为存在的内容。 (Submit a PR to the repo if you do that!) (如果这样做,请向回购提交PR!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM