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. #164

Closed
mirzazeyrek opened this issue Sep 20, 2017 · 11 comments
Closed

SyntaxError: Use of const in strict mode. #164

mirzazeyrek opened this issue Sep 20, 2017 · 11 comments
Assignees
Labels
non issue Issue is not a problem or requires changes

Comments

@mirzazeyrek
Copy link

This error message started to appear recently. Is there anything you guys suggest may be ?

/node_modules/grunt-sass/node_modules/node-sass/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
11:16:32 const Hoek = require('hoek');
11:16:32 ^^^^^
11:16:32 SyntaxError: Use of const in strict mode.
11:16:32 at exports.runInThisContext (vm.js:73:16)
11:16:32 at Module._compile (module.js:443:25)
11:16:32 at Object.Module._extensions..js (module.js:478:10)
11:16:32 at Module.load (module.js:355:32)
11:16:32 at Function.Module._load (module.js:310:12)
11:16:32 at Module.require (module.js:365:17)
11:16:32 at require (module.js:384:17)
11:16:32 at Object. (/var/jenkins/workspace/artbees-portal/pr/253/node_modules/grunt-sass/node_modules/node-sass/node_modules/request/node_modules/hawk/lib/index.js:5:33)
11:16:32 at Module._compile (module.js:460:26)
11:16:32 at Object.Module._extensions..js (module.js:478:10)

@Marsup
Copy link
Contributor

Marsup commented Sep 20, 2017

You're likely using a version of nodejs that's too old.

@Marsup Marsup closed this as completed Sep 20, 2017
@Marsup Marsup self-assigned this Sep 20, 2017
@Marsup Marsup added the non issue Issue is not a problem or requires changes label Sep 20, 2017
@AdriVanHoudt
Copy link
Contributor

I saw this passing by on twitter. Also broke request :P Hawk updated to a version of hoek that started using const with a minor or patch bump...

@Marsup
Copy link
Contributor

Marsup commented Sep 20, 2017

It's pre 4, nobody should be using those versions today, it's insecure.

@eliihen
Copy link

eliihen commented Sep 20, 2017

Well, boom is used by hawk, which is used by request, which is used by node-sass, which is used by grunt-sass. So now the sass-files of our legacy webapps aren't building on the CI without us doing any changes to our dependencies :)

Not your fault, I know, just commenting on the "nobody should be using those versions today". Legacy. Lots of red in jenkins today

@mirzazeyrek
Copy link
Author

@esphen this is exactly what we are going through luckily I was able to find a solution after some digging through the web!

sass/node-sass#2100 (comment)

@Marsup Yeah but it's not always possible to convince your p.m. to give some time to just update npm and solve all the errors from legacy packages during the process !

@pagameba
Copy link

This has broken all our ci and deployments, agreed nobody should be using those versions but some of us are stuck with legacy systems. Semver.

@AdriVanHoudt
Copy link
Contributor

See request/request#2772 (comment) for more info.

@Marsup
Copy link
Contributor

Marsup commented Sep 20, 2017

It doesn't seem to be our fault here, but as you already found out, shrinkwrap is your friend for legacy apps. Or any app you release really. FWIW request has been declaring support for node engine >= 4 since 11 months according to the commit log, you have probably seen those warnings months ago in your npm logs and willfully decided to ignore it, it's a bit unfair to wake up now.

I hope you carefully assessed the risks of running a vulnerable node version and that your PM is OK with making your company take those risks.

@AdriVanHoudt
Copy link
Contributor

@hueniverse
Copy link
Contributor

request/request#2831

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
non issue Issue is not a problem or requires changes
Projects
None yet
Development

No branches or pull requests

6 participants