question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upgrading to react-script 3.3.1 breaks optional chaining

See original GitHub issue

Since upgrading to react-scripts 3.3.1 my code, which uses optional chaining, fails to compile.

Module parse failed: Unexpected token (22:12)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
 * ./node_modules/eslint-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|   // library barfs if you have an undefined value here instead of an empty array
|
>   if (props?.SelectProps?.multiple && field.value === undefined) {
|     field.value = [];

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:23
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

7reactions
hanneswidrigcommented, Feb 15, 2020

This issue is still present on 3.4.0.

6reactions
lnhrdtcommented, Feb 9, 2020

@ggascoigne I encountered the same problem when upgrading to 3.3.1. I was able to resolve the issue and stay on 3.3.1 by deleting my node_modules folder and reinstalling my dependencies.

I don’t understand the underlying issue but sharing this info in case it helps others.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling optional chaining in a create-react-app
In this post, we'll learn how to enable optional chaining in an ... Use create-react-app version 3.3.0 or upgrade to react-scripts 3.3.0 or...
Read more >
Using Optional Chaining?. With Cra/Reactscripts - ADocLib
UPD3 fix for optional chaining landed into acorn 7.3.0 but [email protected] uses acorn 6.x. so upgrading to reactscript 3.3.1 breaks optional chaining....
Read more >
Optional-Chaining does not work in create-react-app
I noticed that if i upgrade react-scripts to 4+ optional chaining didnt work in my app, if i brought it down to 3.x.x...
Read more >
create-react-app 3.3.0 released! Support for optional chaining ...
I reckon I could run a global replace and nothing will break. Javascript needed nullish coalescing so bad.
Read more >
Third-party software dependencies | Elastic Cloud Enterprise ...
Library Version Optional/Required Packaged akka‑actor_2.12 2.6.18 Required Yes akka‑http‑core_2.12 10.2.7 Required Yes akka‑http‑json4s_2.12 1.27.0 Required Yes
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found