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

Error: "Use of const in strict mode" #192

Closed
Evanito opened this issue May 26, 2017 · 3 comments
Closed

Error: "Use of const in strict mode" #192

Evanito opened this issue May 26, 2017 · 3 comments

Comments

@Evanito
Copy link

Evanito commented May 26, 2017

I get the following error when running any zenbot command, fresh install on Raspbian.

pi@evpi:~ $ zenbot trade --help

/home/pi/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/pi/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)

Have done npm install and npm link, with only minor deprecation warns.

EDIT: I have updated node and no longer get this error (or any output at all...)

@DeviaVir
Copy link
Owner

DeviaVir commented May 26, 2017

What version of node was this? It sounds like you are running 0.1x instead of one of the latest versions.

As you can see from the dockerfile, here https://github.com/carlos8f/zenbot/blob/master/Dockerfile#L1
it is running on latest node, currently 7.10.

Remember to run npm install with your new node version.

@Evanito
Copy link
Author

Evanito commented May 26, 2017

dpkg --list
ii node 0.3.2-7.4 all Amateur Packet Radio Node program (transitional package) ???
There is something very wrong here.
ii nodejs 0.10.29~dfsg-2 armhf evented I/O for V8 javascript

EDIT: Currently updating to new node version with the following commands:

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y nodejs

Source: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=141770

@Evanito
Copy link
Author

Evanito commented May 26, 2017

Above command solved issue.

Thanks for pointing me in the right direction!

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