-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
yarn 1.12.1 break support for node 4 #6619
Comments
This likely comes from a dependency we use, because the build pipeline hasn't changed. Maybe something added / upgraded to I would definitely merge a PR that would fix this. In the meantime, you can use the |
Also note that Yarn 2 will drop support for Node 4 - I'd suggest to upgrade to Node 8+ if possible (it's not clear whether we'll want to support Node 6, cf this rfc). |
This should have been fixed in 1.12.1 by #6535 😕 |
Actually this is not fixed. Both node 4 and node 5 are not supported.
or
return the following error
|
It looks like this is caused by yarn's dependency on But the upgrade to v3.1.0 added an object destructuring: https://github.com/pnpm/cmd-shim/blob/%40zkochan/cmd-shim/3.1.0/index.js#L89-L92 and since dependencies aren't babel transpiled by default, that is getting included in the built deployment of yarn. @arcanis any thoughts on this? It seems weird that the node v4 tests passed for that PR... unless the code is transpiled differently for the tests vs the deployment build... |
Closing as we're now focusing on Yarn 2+ which dropped support for all Node versions below Node 10. |
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
yarn@1.12.1 /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 yarn@1.11.1
/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
yarn@1.11.1 /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
The text was updated successfully, but these errors were encountered: