简体   繁体   English

在安装NodeJS之后在Mac中安装Phonegap时出现此错误?

[英]Getting this error while installing Phonegap in mac after installing NodeJS?

I am trying to install Phonegap in my mac after installing Node JS.And I get this error after “sudo npm install -g phonegap” 我在尝试安装Node JS之后在Mac中安装Phonegap。在“ sudo npm install -g phonegap”之后收到此错误

npm WARN deprecated deflate-crc32-stream@0.1.2: module has been merged into crc32-stream npm WARN不建议使用deflate-crc32-stream@0.1.2:模块已合并到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) || 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)| | (exit 0) (0号出口)

Actually its not an error. 实际上,这不是错误。 Its a warning. 这是一个警告。 I experienced something similar just a while ago: 不久前,我经历了类似的事情:

  # 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)

I had to manually download http://github.com/component/emitter/archive/1.0.1.tar.gz 我不得不手动下载http://github.com/component/emitter/archive/1.0.1.tar.gz

# wget "http://github.com/component/emitter/archive/1.0.1.tar.gz"

And install it: 并安装:

 # npm install -g 1.0.1.tar.gz 
   emitter@1.0.1 /usr/local/lib/node_modules/emitter
   └── indexof@0.0.1

And then ran the command again and still received the warning but it continued after a while and completed the installation: 然后再次运行该命令,仍然收到警告,但一段时间后继续,并完成了安装:

  # 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)

I have just started trying phonegap. 我才刚开始尝试phonegap。 I hope you found a way out. 希望您找到了出路。

Never figured it out either :-( Workaround: 从来没有弄清楚:-(解决方法:

$sudo npm install -g cordova

and use Cordova instead. 并改用Cordova。

try Using terminal with the following command 尝试通过以下命令使用终端

$sudo npm install -g cordova

to get cordova running on my Mac. 在我的Mac上运行cordova。 You can also use Phonegap Desktop Client. 您也可以使用Phonegap Desktop Client。 Download it from their website. 从他们的网站下载。

尝试安装Node.js的0.10x版本,因为它解决了Windows 8中的此问题。

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

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