Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Version 4.0 Error: Use of const in strict mode #160

Closed
stevepm opened this issue May 20, 2017 · 5 comments
Closed

Version 4.0 Error: Use of const in strict mode #160

stevepm opened this issue May 20, 2017 · 5 comments

Comments

@stevepm
Copy link

stevepm commented May 20, 2017

Freshly installed, and this is after npm install.

Oddly enough, for some commands, running node --harmony ./zenbot.sh <command> works, but for most it doesn't.

zenbot trade --paper
fetching pre-roll data:
/home/steve/zenbot/node_modules/gdax/lib/request_signer.js:2
const crypto = require('crypto');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/steve/zenbot/node_modules/gdax/lib/clients/websocket.js:5:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
@stevepm stevepm changed the title Error: Use of const in strict mode Version 4.0 Error: Use of const in strict mode May 20, 2017
@Raslin777
Copy link

I originally had this error when I was using nodejs legacy, after I updated it to proper nodejs the error went away. Idk if this is related to your issue.

You might want to uninstall all npms and do a reinstall(though u said it was a fresh install).

@stevepm
Copy link
Author

stevepm commented May 20, 2017

I installed node via sudo apt-get install nodejs npm

@Raslin777
Copy link

You might want to check your node version.

I installed with the below commands. (No quotes)
"curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -"
"sudo apt-get install -y nodejs"

Just remember that i'm not 100% sure this is your issue.

@stevepm
Copy link
Author

stevepm commented May 20, 2017

Yes, that was the issue, thanks!

@stevepm stevepm closed this as completed May 20, 2017
@Raslin777
Copy link

Awesome happy it worked out

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

No branches or pull requests

2 participants