This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Error with node >= 6.0.0 and < 7.7.0 #840
Closed
Description
js-ipfs-api declares support of nodejs >= 6.0.0 in package.json. But in fact it does not support versions below 7.7.0.
My node version is 6.10, and I get this when calling ipfs.refs.local()
:
TypeError: res.req.getHeaders is not a function at: TypeError: res.req.getHeaders is not a function
at ClientRequest.<anonymous> (/var/www/something/node_modules/ipfs-api/src/utils/send-request.js:41:38)
at ClientRequest.g (events.js:291:16)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:474:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
at Socket.socketOnData (_http_client.js:363:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)
Support for ClientRequest.getHeaders()
was added only in 7.7.0: https://nodejs.org/api/http.html#http_response_getheaders
engines.node
field in package.json should probably be raised to >=7.7.0
to avoid confusion.