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

SyntaxError: use of const in strict mode #136

Closed
Sizuko opened this issue Jul 26, 2016 · 15 comments
Closed

SyntaxError: use of const in strict mode #136

Sizuko opened this issue Jul 26, 2016 · 15 comments

Comments

@Sizuko
Copy link

Sizuko commented Jul 26, 2016

Hi,

Since you merge with #135, i got this error.
It seems it comes from index.js file in to-ico package.

@Sizuko Sizuko changed the title SyntaxError: use of const in strict mod SyntaxError: use of const in strict mode Jul 26, 2016
@alexander-akait
Copy link
Member

@Sizuko Thanks for feedback, what node version are you use?

@Sizuko
Copy link
Author

Sizuko commented Jul 26, 2016

I'm on 6.2.0

Edit:
I'm using node version provided by meteor so its 0.10.46

@alexander-akait
Copy link
Member

alexander-akait commented Jul 26, 2016

@Sizuko can't reproduce. Can you get more information about problem?

@alexander-akait
Copy link
Member

@Sizuko toIco not support 0.10 node, maybe best solution up version nodejs? If this is not possible, I see what you can do with it.

@Sizuko
Copy link
Author

Sizuko commented Jul 26, 2016

Here is a copy of the error that i get when i start my meteor app:

/Users/nicolasthomas/Documents/IconsGeneratorTests/.meteor/local/build/programs/server/packages/modules.js:109174
const parsePng = require('parse-png');
^^^^^
SyntaxError: Use of const in strict mode.
at /Users/nicolasthomas/Documents/IconsGeneratorTests/.meteor/local/build/programs/server/boot.js:292:30
at Array.forEach (native)
at Function._.each._.forEach (/Users/nicolasthomas/.meteor/packages/meteor-tool/.1.3.4.sbx0n2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
at /Users/nicolasthomas/Documents/IconsGeneratorTests/.meteor/local/build/programs/server/boot.js:133:5
=> Exited with code: 8

@alexander-akait
Copy link
Member

@Sizuko what about up version node, i written this above?

@Sizuko
Copy link
Author

Sizuko commented Jul 26, 2016

For now i'm using meteor 1.3.4 which is using the version of node that i tell you but they are updating meteor to 1.4 and they are upgrading to node version 4.4.7
Don't know if it will fix it.

Until i know how to fix it i will continue to use favicon 4.7.1 that i used before updating.

@alexander-akait
Copy link
Member

@Sizuko good solution, i think we need docs about this.
/cc @haydenbleasel
We will need write note in docs about support for old nodejs version users.

@Sizuko
Copy link
Author

Sizuko commented Jul 26, 2016

I'll make you know if meteor 1.4 fix my error.
Until then, thx for fast reply @evilebottnawi

@haydenbleasel
Copy link
Contributor

@Sizuko @evilebottnawi It's because to-ico is our only dependency written purely in ES6. So the answer is to get Node running on v5 or v6+ (with ES6 support) but I'd love if to-ico implemented an ES5 version like Favicons does.

@alexander-akait
Copy link
Member

@haydenbleasel we can do PR

@haydenbleasel
Copy link
Contributor

@evilebottnawi Yeah it should be easy, just need a gulpfile like this repo with Babel.

@alexander-akait
Copy link
Member

@haydenbleasel i create issue, let's wait what say @kevva

@kevva
Copy link

kevva commented Sep 12, 2016

0.10 is only maintained until October and 0.12 until December. I suggest upgrading to v4 or v6. I'm not supporting anything below v4 in my modules anymore.

@brunocodutra
Copy link
Collaborator

It's been 18 months and even node 4 is about to reach EOL.

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

No branches or pull requests

5 participants