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

Parsing Issue #16

Closed
jgarackal opened this issue Oct 31, 2016 · 3 comments
Closed

Parsing Issue #16

jgarackal opened this issue Oct 31, 2016 · 3 comments

Comments

@jgarackal
Copy link

jgarackal commented Oct 31, 2016

There is some parsing issue which has started causing the following error since the new release:

SyntaxError: Use of const in strict mode. at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.cls_wrapMethod (/var/app/current/node_modules/newrelic/lib/shimmer.js:246:38) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (/var/app/current/node_modules/redis/node_modules/redis-parser/index.js:3:18) at Module._compile (module.js:460:26) /var/app/current/node_modules/redis/node_modules/redis-parser/lib/parser.js:230 const err = new ReplyError('Protocol error, got ' + JSON.stringify(Strin

@bradmurray
Copy link

It looks like line 230 of /lib/parser.js has to change from

const err = new ReplyError('Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte', 20)

to

var err = new ReplyError('Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte', 20)

@chrisbnt
Copy link

I reported the same issue in #17...

I suspect the use of const with "use strict"; in node 0.10 or 0.12 is the root cause. Hopefully either const can be replaced with var, or the minimum engine requirement can be bumped to node 4.0.

BridgeAR added a commit that referenced this issue Oct 31, 2016
Parsing Issue #16 change const to var (for support nodejs 0.10.x)
@BridgeAR
Copy link
Member

Fixed

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

4 participants