我关注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.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
任何解决方案?感谢
答案 0 :(得分:1)
我不认为您的问题与semver依赖关系有关。我认为该命令不在您的系统路径中。我有相同的依赖警告,但该命令有效。请在此处查看常见问题解答:https://npmjs.org/package/phonegap