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

Block-scoped declarations (let, const, function, class) not yet supported outside strict mode #106

Closed
joeyrogues opened this issue Jan 19, 2018 · 2 comments

Comments

@joeyrogues
Copy link

@joeyrogues joeyrogues commented Jan 19, 2018

Stack

ember-cli: 2.12.1
node: 4.7.2
os: linux x64

Steps to reproduce

$> ember new myapp
$> cd myapp
$> ember install ember-attacher@^0.13.0
Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Function.addonProto._requireBuildPackages.transpileModules.pickFiles.initializeAddons.eachAddonInvoke._eachProjectAddonInvoke.args._fileSystemInfo.addonProto.(anonymous function).Addon.lookup (/tmp/todo/myapp/node_modules/ember-cli/lib/models/addon.js:1593:19)
    at /tmp/todo/myapp/node_modules/ember-cli/lib/models/addons-factory.js:54:38
    at visit (/tmp/todo/myapp/node_modules/ember-cli/lib/utilities/DAG.js:23:3)

From what I've found
This is most likely due to node@4.7.2 and Block-scoped declarations
BUT
2 days ago we had ember-attacher working alright.

Hypothesis

  1. Some (sub)dependencies of ember-attacher have permissive (^ or ~) and my problem is caused because some nested / nested / nested / nested dependencies have changed and now have non-compliant Block-scoped declarations

Potential solutions

  1. Update nodejs
  2. Look for the incriminated dependency(ies)
  3. Something else???

What do you think? :)

@kybishop

This comment has been minimized.

Copy link
Owner

@kybishop kybishop commented Jan 19, 2018

I'm honestly surprised node 4 was working at all 😉 You might notice that Travis is set to use node 6; I find Node 4's lack of even the basic creature-comforts quite painful to work with.

I'm hard pressed to tack down our dependencies given that ember drops support for Node 4 in April https://github.com/ember-cli/ember-cli/blob/026cefd5de36c0ae448883067450f51f2e127bbf/docs/node-support.md

How painful would it be for you guys to update Node? We can possibly create a temporary branch for people to use until they can update.

@joeyrogues

This comment has been minimized.

Copy link
Author

@joeyrogues joeyrogues commented Jan 22, 2018

Too bad.
Thanks for your answer.
It's time for some upgrades I guess :)
You can close the issue :)

@kybishop kybishop closed this Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.