Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

OrderbookSync RangeError #3

Closed
johnjelinek opened this issue Jul 24, 2016 · 3 comments
Closed

OrderbookSync RangeError #3

johnjelinek opened this issue Jul 24, 2016 · 3 comments

Comments

@johnjelinek
Copy link

code:

var Gdax = require('gdax');
var orderbookSync = new Gdax.OrderbookSync('ETH-USD')

then just wait a little and ...

RangeError: out of range index
    at RangeError (native)
    at fastCopy (/mnt/c/Users/John Jelinek/Documents/gdax/node_modules/ws/lib/Receiver.js:382:24)
    at Receiver.add (/mnt/c/Users/John Jelinek/Documents/gdax/node_modules/ws/lib/Receiver.js:82:3)
    at TLSSocket.firstHandler (/mnt/c/Users/John Jelinek/Documents/gdax/node_modules/ws/lib/WebSocket.js:775:22)
    at emitOne (events.js:96:13)
    at TLSSocket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:177:18)
    at TLSSocket.Readable.push (_stream_readable.js:135:10)
    at TLSWrap.onread (net.js:542:20)
@johnjelinek
Copy link
Author

oh -- also, I'm running this in a node repl

@chrisinajar
Copy link

This happens in node version 6.3+ (tested from 6.3.0 up till 6.7.0)... Installing either node 6.2, or the LTS 4.x series, will resolve the issue. You can use nvm or the more simple but more aggressive n.

If you install from the repository it will work, the package.json in the repo points at ws version 1.1.1 which no longer has this issue. Once the author publishes to npm this wont be a problem anymore.

@loriopatrick
Copy link

Resolved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants