React compilation error with Basemap.js

I’m trying to compile a React project and am getting the following error – could anyone kindly help?:

./node_modules/@arcgis/core/Basemap.js 106:28
Module parse failed: Unexpected token (106:28)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| }
| write(e, r) {
> return e = e || {}, r?.origin || (r = {
| origin: “web-map”,
| …r

With thanks

Read more here: Source link