【发布时间】:2015-12-17 20:13:22
【问题描述】:
我已尝试使用以下命令安装 phonegap。
sudo /usr/local/bin/npm install -g phonegap@latest
但是我得到了这个输出。我找不到任何日志,它在哪里?或者对这个问题有任何帮助。
> ws@0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> ws@0.4.31 install /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
/usr/local/bin/phonegap -> /usr/local/lib/node_modules/phonegap/bin/phonegap.js
phonegap@5.3.9 /usr/local/lib/node_modules/phonegap
├── pluralize@0.0.4
├── colors@0.6.0-1
├── semver@1.1.0
├── minimist@0.1.0
├── qrcode-terminal@0.9.4
├── shelljs@0.1.4
├── prompt@0.2.11 (revalidator@0.1.8, pkginfo@0.3.1, read@1.0.7, winston@0.6.2, utile@0.2.1)
├── phonegap-build@0.9.2 (colors@0.6.2, qrcode-terminal@0.8.0, optimist@0.3.7, shelljs@0.0.9, phonegap-build-api@0.3.3)
├── connect-phonegap@0.18.1 (home-dir@0.1.2, connect-inject@0.3.2, ip@0.3.1, adm-zip@0.4.7, request-progress@0.3.1, http-proxy@1.8.1, walkdir@0.0.8, shelljs@0.2.6, useragent@2.0.8, request@2.33.0, node-static@0.7.0, gaze@0.4.3, tar@0.1.19, localtunnel@1.3.0, socket.io@1.0.4, archiver@0.14.3, connect@2.12.0)
└── cordova@5.4.1 (underscore@1.7.0, q@1.0.1, ansi@0.3.0, nopt@3.0.1, update-notifier@0.5.0, cordova-lib@5.4.1)
我正在使用 node.js build 4.2.3 并使用 Mac OS
运行上述命令后,我运行命令 phonegap 以确保安装正常,但我得到以下输出。有什么想法吗?
phonegap
-bash: phonegap: command not found
【问题讨论】:
-
该命令不安装 npm,它使用 npm 从 npm 安装 phonegap。此外,该输出看起来并没有失败。
-
当我输入命令电话间隙时它不起作用。我将编辑帖子以使其清晰。
-
帖子现已更新,信息更清晰。谢谢
-
/usr/local/bin在你的路径中吗?尝试使用/usr/local/bin/phonegap。 -
我根据您的反馈尝试了这个 sudo /usr/local/bin/phonegap/npm install -g phonegap@latest 并得到了这个响应 sudo: /usr/local/bin/phonegap/npm: command没找到
标签: node.js macos terminal npm