mjesuele / gemini-api-node

Node.js client for the Gemini cryptocurrency exchange API
26 stars 17 forks source link

On Boot Constructor Error #1

Closed yongyi520 closed 7 years ago

yongyi520 commented 7 years ago

When I import gemini-api like in the example:

import GeminiAPI from 'gemini-api';

packages/modules.js:377 W20170615-16:46:00.105(7)? (STDERR) constructor({ key, secret, sandbox = false } = { sandbox: false }) { W20170615-16:46:00.106(7)? (STDERR) ^ W20170615-16:46:00.106(7)? (STDERR) W20170615-16:46:00.107(7)? (STDERR) SyntaxError: Unexpected token {

.... Is there a way to fix this?

yongyi520 commented 7 years ago

Seems like my npm lib cannot read es6 syntax...

mjesuele commented 7 years ago

@yongyi520 Yes, you need to use Node 6 or higher. I'm going to add this to the engines field of package.json to help make this clearer.

mjesuele commented 7 years ago

^^ the above commit messages should read >= 6, not ^6

yongyi520 commented 7 years ago

I develop in meteor, it seems like I cannot use this package until Meteor v1.6 is out (meteor 1.5 supports Node 4) This is a great library, can't wait to use it soon!