krystianity / node-bitstamp

bitstamp REST and WS API Node.js client :dollar:
MIT License
59 stars 41 forks source link

The library does not work on the latest version of node #31

Open Giancarlo1974 opened 5 years ago

Giancarlo1974 commented 5 years ago

The library does not work on the latest version of node

node -v v12.6.0

node index.js i got this error:

Error: Parse Error at TLSSocket.socketOnData (_http_client.js:452:22) at TLSSocket.emit (events.js:203:13) at addChunk (_stream_readable.js:294:12) at readableAddChunk (_stream_readable.js:275:11) at TLSSocket.Readable.push (_stream_readable.js:210:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:166:17) { bytesParsed: 480, code: 'HPE_INVALID_HEADER_TOKEN', reason: 'Invalid header value char' }

This is the temporary workaround for executing the code:

node --http-parser=legacy index.js