-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Metro bundler crashes when checking the NodeJS version (NodeJS <= 8.2.1) #20769
Comments
Can you run If you believe this information is irrelevant to the reported issue, you may write |
Can you submit a PR for that? Would be really helpful. Aside from that, please fill the Env Info section. |
…#20769) (#20779) Summary: Fixes #20769 Release notes -------------- [CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`. Pull Request resolved: #20779 Differential Revision: D9468346 Pulled By: hramos fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
…facebook#20769) (facebook#20779) Summary: Fixes facebook#20769 Release notes -------------- [CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`. Pull Request resolved: facebook#20779 Differential Revision: D9468346 Pulled By: hramos fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
…facebook#20769) (facebook#20779) Summary: Fixes facebook#20769 Release notes -------------- [CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`. Pull Request resolved: facebook#20779 Differential Revision: D9468346 Pulled By: hramos fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
…facebook#20769) (facebook#20779) Summary: Fixes facebook#20769 Release notes -------------- [CLI] [BUGFIX] [local-cli/server/checkNodeVersion.js] - Disable auto-formatting in `local-cli/server/checkNodeVersion.js` since it introduces ES6 and ES7 syntax (trailing comma in argument list) which in turn makes ES5 engines crash with a `SyntaxError`. Pull Request resolved: facebook#20779 Differential Revision: D9468346 Pulled By: hramos fbshipit-source-id: 24761a377a5fd104e11ed6b6e86da15e96a0e38b
Environment
[skip envinfo]
Any environment where nodeJS version is less than 8.2.1.
Description
The script
local-cli/server/checkNodeVersion.js
crashes with aSyntaxError
when run with node versions older than 8.2.1 due to the backwards-incompatible commas in function argument list.The expected behaviour is that the script shows the banner and prompts the developer to upgrade their NodeJS runtime. That is, the script itself has to be written in ES5.
I suspect you format your code programatically. It would be perhaps wise to adjust your style guide so that trailing commas in function argument lists are disallowed. See prettier/prettier#2788.
The text was updated successfully, but these errors were encountered: