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

Not backward compatible. #26

Closed
codingmatty opened this issue Nov 20, 2015 · 6 comments
Closed

Not backward compatible. #26

codingmatty opened this issue Nov 20, 2015 · 6 comments

Comments

@codingmatty
Copy link

After installing from npm, the following makes fontello-cli unusable:

/usr/local/lib/node_modules/fontello-cli/node_modules/needle/node_modules/qs/lib/index.js:5
const Stringify = require('./stringify');
^^^^^
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 Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/fontello-cli/node_modules/needle/lib/needle.js:13:19)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
@codingmatty
Copy link
Author

Looks like you aren't compatible with older versions of node..
Executing node --harmony /usr/local/lib/node_modules/fontello-cli --help yields no output.

@codingmatty codingmatty changed the title Unable to use Not backward compatible. Nov 20, 2015
@rishabh-ink
Copy link

It looks like hapijs/qs are planning to support only Node v4 and above (see hapijs/qs#124), hence this issue. I too faced the same issue on my Node v0.12.7 installation. In my case, upgrading to Node v4.2.2 LTS helped resolve it.

@simison
Copy link

simison commented Nov 26, 2015

+1

Noticed the same with qs yesterday. My app isn't yet Node v4 compatible and I don't have time for it right now, so I just switched for https://www.npmjs.com/package/gulp-fontello instead. :P

@rishabh-ink
Copy link

If upgrading to Node v4+ is not possible, then a temporary workaround can be made by shrinkwrap-ing qs and locking down its version to v5.2.0.

Committing an npm-shrinkwrap.json file into your repo with the following contents would do the trick:

{
  "name": "your-project-name",
  "dependencies": {
    "qs": {
      "version": "5.2.0",
      "from": "qs@v5.2.0",
      "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.0.tgz"
    }
  }
}

After adding the above file, run npm install as usual. npm will install qs v5.2.0.

@paulyoung
Copy link
Owner

Sorry, everyone, for the lack of response here.

I'm not totally clear on the best way forward here but if there's a strong consensus I'll try to make that happen.

@codingmatty
Copy link
Author

I personally just upgraded node and it works fine.

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