Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

problem w 'argument-parser'? #1

Closed
shawngraham opened this issue Jan 21, 2016 · 4 comments
Closed

problem w 'argument-parser'? #1

shawngraham opened this issue Jan 21, 2016 · 4 comments

Comments

@shawngraham
Copy link

Hi,

Excited to use your package! I've installed, which seemed to go fine, but getting this error:

/usr/local/lib/node_modules/classeur-downloader/bin/cldownload.js:4
const parseArgs = require('../lib/argument-parser'),
^^^^^

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.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

@zbentley
Copy link
Owner

What version of Node are you using?

@shawngraham
Copy link
Author

v0.12.7

@zbentley
Copy link
Owner

This module and script requires ES6 features not found until Node.js version 5.0. You could try running the script manually, with node --harmony /path/to/cldownload.js to force-enable ES6 features. However, in old versions of node those features may not work properly, and I make no guarantees of how well they work.

For information on ES6 and compatibility with different Node versions, see these links:

I'll close this issue in a few minutes with a commit that adds a nodejs version requirement to the package.json file, which will prevent the module from being installed in incompatible environments, so the errors (when they occur) will be less confusing to users.

Feel free to file a different issue/send a PR to make this module compatible with earlier versions of Node (perhaps via a transpiler like Babel); if not, support for older runtimes/transpilation is a planned feature, but probably won't be ready for awhile.

Thanks for the issue report!

zbentley added a commit that referenced this issue Jan 21, 2016
@zbentley
Copy link
Owner

New version is live on NPM FYI.

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