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

Metro bundler crashes when checking the NodeJS version (NodeJS <= 8.2.1) #20769

Closed
3 tasks done
keksipurkki opened this issue Aug 21, 2018 · 2 comments
Closed
3 tasks done
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@keksipurkki
Copy link

keksipurkki commented Aug 21, 2018

Environment

[skip envinfo]
Any environment where nodeJS version is less than 8.2.1.

Description

The script local-cli/server/checkNodeVersion.jscrashes with a SyntaxError 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.

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@kelset
Copy link
Collaborator

kelset commented Aug 21, 2018

The expected behaviour is that the script shows the banner and prompts the developer to upgrade their NodeJS runtime

Can you submit a PR for that? Would be really helpful.

Aside from that, please fill the Env Info section.

hramos pushed a commit that referenced this issue Aug 23, 2018
…#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
aleclarson pushed a commit to aleclarson/react-native that referenced this issue Sep 16, 2018
…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
t-nanava pushed a commit to microsoft/react-native-macos that referenced this issue Jun 17, 2019
…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
t-nanava pushed a commit to microsoft/react-native-macos that referenced this issue Jun 17, 2019
…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 facebook locked as resolved and limited conversation to collaborators Aug 23, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants