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 #116

Open
typeoneerror opened this issue Dec 23, 2017 · 3 comments

Comments

@typeoneerror
Copy link

Just updated from 0.8.1 to 0.9.2 and now get this when I start my ember app. Is watson backwards compatible with ember-cli 2.8.x or do I need to upgrade ember and other components to use this? I'm going to try to use ember watson outside of cli first, but here's the error I have in case anyone can help.

node@4.8.11
npm@2.15.11
ember@2.8.0

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 Object.<anonymous> (/Users/typeoneerror/Dev/doki.io/frontend/node_modules/ember-watson/lib/watson.js:19:34)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
@typeoneerror
Copy link
Author

More specifics after installing globally:

/Users/typeoneerror/.nvm/versions/node/v4.8.1/lib/node_modules/ember-watson/lib/formulas/convert-tests-to-async-await.js:61
  let callback = node.expression.arguments[1];
  ^^^

points here:

https://github.com/abuiles/ember-watson/blob/master/lib/formulas/convert-tests-to-async-await.js#L61

I got money that it's because I'm node 4.x?

@typeoneerror
Copy link
Author

Yep, 😢. I'm having the hardest time getting our app to work on newer versions of node, so I was hoping to not have to upgrade, but looks like I may be hosed.

~/Dev/doki.io/frontend (feature/ember-cli-update) $ nvm use lts/carbon
Now using node v8.9.3 (npm v5.5.1)
~/Dev/doki.io/frontend (feature/ember-cli-update) $ npm install -g ember-watson
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated babel-preset-es2015@6.24.1: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
/Users/typeoneerror/.nvm/versions/node/v8.9.3/bin/ember-watson -> /Users/typeoneerror/.nvm/versions/node/v8.9.3/lib/node_modules/ember-watson/bin/ember-watson
+ ember-watson@0.9.1
added 292 packages in 11.806s
~/Dev/doki.io/frontend (feature/ember-cli-update) $ ember-watson --version
0.9.1

@knownasilya
Copy link
Collaborator

This should be fixable in watson by adding 'use strict'; to that file.

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

2 participants