【问题标题】:Getting this error while installing Phonegap in mac after installing NodeJS?安装 NodeJS 后在 mac 中安装 Phonegap 时出现此错误?
【发布时间】:2014-12-03 22:46:08
【问题描述】:
我在安装 Node JS 后尝试在我的 mac 中安装 Phonegap。在“sudo npm install -g phonegap”之后出现此错误
npm WARN 已弃用 deflate-crc32-stream@0.1.2:模块已合并到 crc32-stream
ws@0.4.31 安装 /usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/socket.io/node_modules/engine.io/node_modules/ws
(node-gyp 重建 2> builderror.log) || (0号出口)
【问题讨论】:
标签:
android
macos
cordova
【解决方案1】:
其实这不是错误。它是一个警告。不久前我经历过类似的事情:
# npm install -g phonegap
npm WARN deprecated deflate-crc32-stream@0.1.2: module has been merged into crc32-stream
npm ERR! fetch failed http://github.com/component/emitter/archive/1.0.1.tar.gz
> 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)
我不得不手动下载http://github.com/component/emitter/archive/1.0.1.tar.gz
# wget "http://github.com/component/emitter/archive/1.0.1.tar.gz"
并安装它:
# npm install -g 1.0.1.tar.gz
emitter@1.0.1 /usr/local/lib/node_modules/emitter
└── indexof@0.0.1
然后再次运行命令,仍然收到警告,但过了一会儿又继续,完成了安装:
# npm install -g phonegapnpm WARN deprecated deflate-crc32-stream@0.1.2: module has been merged into crc32-stream
> 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)
我刚刚开始尝试 phonegap。希望你能找到出路。
【解决方案2】:
也从未想过:-(解决方法:
$sudo npm install -g cordova
并改用 Cordova。
【解决方案3】:
尝试通过以下命令使用终端
$sudo npm install -g cordova
让科尔多瓦在我的 Mac 上运行。您还可以使用 Phonegap 桌面客户端。
从他们的网站下载。
【解决方案4】:
尝试安装 0.10x 版本的 Node.js,因为它在 Windows 8 中解决了这个问题。