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.

Problem with null coalescing operator in 2.6.5 release

See original GitHub issue

API Platform version(s) affected: 2.6.5

Description
After upgrading from 2.6.4 to 2.6.5 babel in our API Platform app complained about an unexpected token in node_modules. I think this is because the null coalescing operator from https://github.com/api-platform/admin/commit/0084ae335eab197b6fe7847ad9ac9582274fc2e7#diff-a510ff3025a65f9208998b879111392bde385c82d36cc828b71881751f5ca191R247 is not correctly transpiled in the latest release.

How to reproduce
Currently only can reproduce it locally by upgrading. Before I create a dedicated repo and so I want to rule out that this is just a very simple mistake in the admin build.

Possible Solution
I don’t know enough about babel, but is there more config needed for that? Something related to ES2020 or so maybe?

Additional Context
The exact error is

./node_modules/@api-platform/admin/lib/hydra/dataProvider.js 243:138
Module parse failed: Unexpected token (243:138)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     }
| 
>     const extraInformation = ((_params$data = params.data) === null || _params$data === void 0 ? void 0 : _params$data.extraInformation) ?? {};
|     (_params$data2 = params.data) === null || _params$data2 === void 0 ? true : delete _params$data2.extraInformation;
|

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
herndlmcommented, Sep 20, 2021

https://github.com/facebook/create-react-app/issues/11339 and https://github.com/facebook/create-react-app/issues/11434 might be related, I susbscribed to them and will update this issue if I find out something new.

1reaction
alanpoulaincommented, Sep 24, 2021

Changed in 2.6.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nullish coalescing operator (??) - JavaScript - MDN Web Docs
The nullish coalescing (??) operator is a logical operator that returns its right-hand side operand when its left-hand side operand is null ......
Read more >
Documentation - TypeScript 3.7
The nullish coalescing operator is another upcoming ECMAScript feature that goes hand-in-hand with optional chaining, and which our team has been involved ...
Read more >
and ??= operators - null-coalescing operators - Microsoft Learn
The null-coalescing operator ?? returns the value of its left-hand operand if it isn't null ; otherwise, it evaluates the right-hand operand ...
Read more >
Hibernate ORM 5.4.33.Final User Guide - Red Hat on GitHub
Use Hibernate and report any bugs or issues you find. ... create table Contact ( id integer not null, first varchar(255), last varchar(255), ......
Read more >
Spark - Hortonworks Data Platform - Cloudera Documentation
SPARK-22550: Fix 64KB JVM bytecode limit problem with elt. HDP 2.6.3 provided Spark 1.6.3 with no additional Apache patches. In addition, this release...
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