我跟着 this official guide开始了 npm install -g phonegap 它一直运行到最后,我得到了这个警告: C:\Users\myname\AppData\Roaming\npm\phonegap - C:\Users\myname\AppData\Roaming\npm\node_modules\phonegap\bin\phonegap.jsnpm
npm install -g phonegap
它一直运行到最后,我得到了这个警告:
C:\Users\myname\AppData\Roaming\npm\phonegap -> C:\Users\myname\AppData\Roaming\ npm\node_modules\phonegap\bin\phonegap.js npm WARN unmet dependency C:\Users\myname\AppData\Roaming\npm\node_modules\phone gap\node_modules\cordova\node_modules\npm\node_modules\npm-registry-client requi res semver@'^2.2.1' but will load npm WARN unmet dependency C:\Users\myname\AppData\Roaming\npm\node_modules\phone gap\node_modules\cordova\node_modules\npm\node_modules\semver, npm WARN unmet dependency which is version 2.2.1
我试图运行phonegap create my-app命令并得到此错误
'phonegap' is not recognized as an internal or external command, operable program or batch file.
我认为它没有成功安装,但是当我运行npm -g list时我可以看到phonegap
有解决方案吗谢谢
我不认为你的问题与semver依赖关系有关.我认为该命令不在您的系统路径中.我有相同的依赖警告,但该命令有效.请看这里的FAQ: https://npmjs.org/package/phonegap