Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught ReferenceError: Price is not defined (pricing.js) #7

Open
quantverse opened this issue Dec 12, 2018 · 2 comments
Open

Uncaught ReferenceError: Price is not defined (pricing.js) #7

quantverse opened this issue Dec 12, 2018 · 2 comments

Comments

@quantverse
Copy link

Hello,

the library crashes when attempting to stream prices:

Uncaught ReferenceError: Price is not defined
      at /home/xxx/yyy/zzz/node_modules/@oanda/v20/pricing.js:658:44
      at chunks.forEach.chunk (node_modules/@oanda/v20/context.js:137:33)
      at Array.forEach (<anonymous>)
      at IncomingMessage.response.on.d (node_modules/@oanda/v20/context.js:134:32)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at IncomingMessage.Readable.push (_stream_readable.js:208:10)
      at HTTPParser.parserOnBody (_http_common.js:139:22)
      at TLSSocket.socketOnData (_http_client.js:440:20)
      at addChunk (_stream_readable.js:263:12)
      at readableAddChunk (_stream_readable.js:250:11)
      at TLSSocket.Readable.push (_stream_readable.js:208:10)
      at TLSWrap.onread (net.js:607:20)

it is apparently missing Price object import, for instance by adding a line:

var Price = require('./pricing_common').Price;
@Patafix
Copy link

Patafix commented Oct 12, 2019

Same here

@lukzard
Copy link

lukzard commented Dec 19, 2019

change line 658 in pricing.js with

streamChunkHandler(new ClientPrice(msg));

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

No branches or pull requests

3 participants