3 ms·
Is anyone else having trouble following along at home? I'm met with an error when running `node main.js`. > SyntaxError: Block-scoped declarations (let, const
by ethagnawl 10y ago
Is anyone else having trouble following along at home?
I'm met with an error when running `node main.js`.
> SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
- Arnavion 10y agoTry `node --use_strict main.js`
- ethagnawl 10y agoThanks - that worked! Do you know why that's necessary and why it wasn't mentioned in the tutorial?
- swannodette 10y agoYou probably need to install a more recent version of Node.js. That's one of the first things mentioned.
- ethagnawl 10y agoThanks, David. Upgrading to Node 7.4.0 allowed me to run `node main.js` without having to pass the flag. Granted, I was using an outdated version of Node, but perhaps it'd be helpful to add a >= version number to the Node dependency blurb (a la JDK 8). Either way, thanks for your continued efforts!
- ethagnawl 10y agoOne more thing: the `repl/repl*` function call's map argument is missing a closing `}`.