rafaelrinaldi / hn-cli

:newspaper: CLI to browse Hacker News
MIT License
460 stars 19 forks source link

Error : Use of const in strict mode #15

Closed scriptnull closed 8 years ago

scriptnull commented 8 years ago

After installing the package via npm , I executed hn

It shows up the following error message in terminal

/usr/lib/node_modules/@rafaelrinaldi/hn-cli/bin/hn-cli:6
const cli = require('../cli');
^^^^^
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 Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

I using Ubuntu 14.04 LTS.

rafaelrinaldi commented 8 years ago

@scriptnull what version of Node.js are you running?

scriptnull commented 8 years ago

v0.10.25

rafaelrinaldi commented 8 years ago

@scriptnull yeah, that's why. See on the manifest that it requires node 4 or above. That's a constraint to make sure we can use ES2015 features. Most of my CLI programs follow this rule since they're focused on developers anyway.