Skip to content
Advertisement

Getting compilation errors regarding loaders when running React app

Hi I’m having an issue when trying to run my react app. I’ve installed a couple of packages to from a tutorial using the ceramic and 3id networks. This error has only shown up recently and I’ve looked online but still not too sure what be causing the issue. The version of node I am using is v14.15.0, my npm version is 6.14.8 and I’m on Windows 11 home version 21H2

The error in question is:

JavaScript

My package.json file is as follows:

JavaScript

The current code I have is also just this in my App.js

JavaScript

Advertisement

Answer

Update 2021-12-23

This issue is fixed in Create React App version 5.


Create React App does not currently support some features of ES2020 (Modern Javascript) in imported modules.

?? is the ES2020 Nullish coalescing operator and use of this in the imported Ceramic module causes the build to fail.

The issue is discussed here and seems unlikely to be fixed until the next major version of Create React App.

Two options are to use an alternative React framework such as Next.js which supports the features (example/instructions here), or to set up the React project manually.

Other possible solutions are discussed in this stack overflow question, but the accepted answer will not work when the issue occurs in an imported library.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement