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

'use strict' is required for my setup #3

Closed
GJSmith3rd opened this issue Oct 12, 2016 · 3 comments
Closed

'use strict' is required for my setup #3

GJSmith3rd opened this issue Oct 12, 2016 · 3 comments
Labels

Comments

@GJSmith3rd
Copy link
Owner

GJSmith3rd commented Oct 12, 2016

It seems I have to use

'strict mode';

DEBUG CONSOLE

node --debug-brk=15576 index.js
Debugger listening on port 15576
/home/gjsmith3rd/Workspaces/GIT-Projects/dns-over-http2/index.js:28
let question = req.question[0], hostname = question.name;
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.runMain as _onTimeout
at Timer.listOnTimeout (timers.js:92:15)

If I add 'strict mode' the code now runs but I'm confused about the parameters in dns-over-http2.json.

@GJSmith3rd GJSmith3rd changed the title 'use strict' required for my setup 'use strict' is required for my setup Oct 12, 2016
@Opensourcecommunitydevelopment

yes i have added To My too As i saw it recently in your 528cffd but forgot it in the pull request..

well if first line strict or Not i don't get this errors?and can't see difference with Node v6.8.0 Debugger listening on [::]:15576
for parameters @yyfrankyy would be better To ask about https://github.com/yyfrankyy/dns-over-http2

@GJSmith3rd
Copy link
Owner Author

Maybe because I'm on Node v4.2.6 - I'll look into upgrading.

@Opensourcecommunitydevelopment

node --v8-Options
shows me:
--use_strict (enforce strict mode)
type: bool default: false

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

No branches or pull requests

2 participants