我刚刚通过npm安装了ebay-api包。它的一个依赖项是restler,它抛出了一个我似乎无法修复的错误。
TypeError: Object #<Object> has no method 'gunzip'
at IncomingMessage.<anonymous> (node_modules/restler/lib/restler.js:428:10)
at EventEmitter._decode (node_modules/restler/lib/restler.js:161:25)
at IncomingMessage.<anonymous> (node_modules/restler/lib/restler.js:140:14)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.onMessageComplete (http.js:137:23)
at CleartextStream.ondata (http.js:1125:24)
at CleartextStream._push (tls.js:363:27)
at SecurePair.cycle (tls.js:679:20)
at EncryptedStream.write (tls.js:122:13)
at Socket.ondata (stream.js:38:26)第428行是:
zlib.gunzip(buf, callback);我正在运行node v0.5.11-pre和最新的restler安装。这里的任何帮助都将不胜感激。
发布于 2013-01-19 08:57:10
节点0.5.11-pre没有zlib帮助器方法gunzip。
不幸的是,restler当前的稳定版本是>= 0.6.0。
您也许能够在Node模块上修补该方法,但很可能还有其他问题。升级到稳定版本的Node对您来说合理吗?即使只是到0.6.0,这应该非常类似于0.5.11-pre。
https://stackoverflow.com/questions/14406099
复制相似问题