React native ios error, 'optionalChaining' isn't currently enabled
up vote
0
down vote
favorite
Trying to build my react native app I get this error:
error: bundling failed: SyntaxError: /xxxxr/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (103:41):
I have added:
"presets": ["react-native"],
"plugins": ["@babel/plugin-proposal-optional-chaining"]
To my .babelrc
but I still get the error. How can I build my project?
react-native
add a comment |
up vote
0
down vote
favorite
Trying to build my react native app I get this error:
error: bundling failed: SyntaxError: /xxxxr/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (103:41):
I have added:
"presets": ["react-native"],
"plugins": ["@babel/plugin-proposal-optional-chaining"]
To my .babelrc
but I still get the error. How can I build my project?
react-native
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Trying to build my react native app I get this error:
error: bundling failed: SyntaxError: /xxxxr/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (103:41):
I have added:
"presets": ["react-native"],
"plugins": ["@babel/plugin-proposal-optional-chaining"]
To my .babelrc
but I still get the error. How can I build my project?
react-native
Trying to build my react native app I get this error:
error: bundling failed: SyntaxError: /xxxxr/node_modules/react-native/node_modules/react-native/Libraries/Components/Switch/Switch.js: Support for the experimental syntax 'optionalChaining' isn't currently enabled (103:41):
I have added:
"presets": ["react-native"],
"plugins": ["@babel/plugin-proposal-optional-chaining"]
To my .babelrc
but I still get the error. How can I build my project?
react-native
react-native
asked Nov 9 at 9:44
Bomber
1,890103264
1,890103264
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Try installing plugin-proposal-optional-chaining
plugin as follows:
npm install --save-dev @babel/plugin-proposal-optional-chaining
Try adding below code to your .babelrc:
"plugins": [
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
"react-native"
]
Hope it will help you.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Try installing plugin-proposal-optional-chaining
plugin as follows:
npm install --save-dev @babel/plugin-proposal-optional-chaining
Try adding below code to your .babelrc:
"plugins": [
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
"react-native"
]
Hope it will help you.
add a comment |
up vote
0
down vote
accepted
Try installing plugin-proposal-optional-chaining
plugin as follows:
npm install --save-dev @babel/plugin-proposal-optional-chaining
Try adding below code to your .babelrc:
"plugins": [
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
"react-native"
]
Hope it will help you.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Try installing plugin-proposal-optional-chaining
plugin as follows:
npm install --save-dev @babel/plugin-proposal-optional-chaining
Try adding below code to your .babelrc:
"plugins": [
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
"react-native"
]
Hope it will help you.
Try installing plugin-proposal-optional-chaining
plugin as follows:
npm install --save-dev @babel/plugin-proposal-optional-chaining
Try adding below code to your .babelrc:
"plugins": [
"@babel/plugin-proposal-optional-chaining"
],
"presets": [
"react-native"
]
Hope it will help you.
answered Nov 9 at 15:15
Sandy
1,4542620
1,4542620
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53223281%2freact-native-ios-error-optionalchaining-isnt-currently-enabled%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown