-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Do you want to request a feature or report a bug?
bug
What is the current behavior?
yarn return "SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode"
If the current behavior is a bug, please provide the steps to reproduce.
➜ ~ node --version
v4.9.1
➜ ~ npm i -g yarn
/Users/joshua/.nvm/versions/node/v4.9.1/bin/yarn -> /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js
/Users/joshua/.nvm/versions/node/v4.9.1/bin/yarnpkg -> /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js
[email protected] /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn
➜ ~ yarn --version
/Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/lib/cli.js:62909
let code = codeRegex();
^^^
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. (/Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js:24:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
➜ ~ npm i -g [email protected]
/Users/joshua/.nvm/versions/node/v4.9.1/bin/yarn -> /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js
/Users/joshua/.nvm/versions/node/v4.9.1/bin/yarnpkg -> /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn/bin/yarn.js
[email protected] /Users/joshua/.nvm/versions/node/v4.9.1/lib/node_modules/yarn
➜ ~ yarn --version
1.11.1
What is the expected behavior?
No syntax error
Please mention your node.js, yarn and operating system version.
node 4.9.1, mac osx 10.14.1, same problem on ubuntu and centos