0

I have tried existing solutions of editing browserlist and deleting cache still not working

./node_modules/@react-leaflet/core/lib/path.js 10:39
Module parse failed: Unexpected token (10:39)
You may need an appropriate loader to handle this file type.
|   useEffect(function updatePathOptions() {
|     if (props.pathOptions !== optionsRef.current) {
>       var options = props.pathOptions ?? {};
|       element.instance.setStyle(options);
|       optionsRef.current = options;

my package.json

{
  "name": "bouse",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "^13.4.0",
    "@testing-library/user-event": "^13.5.0",
    "firebase": "^9.10.0",
    "leaflet": "^1.9.2",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-icons": "^4.4.0",
    "react-leaflet": "^4.1.0",
    "react-router-dom": "^6.4.1",
    "react-scripts": "^2.1.3",
    "react-toastify": "^9.0.0",
    "swiper": "^6.8.1",
    "uuid": "^9.0.0",
    "web-vitals": "^2.1.4"
  },
Terry
  • 63,248
  • 15
  • 96
  • 118
  • 1
    The error points to the module parsing failing at the `??` operator. Are you transpiring the code using babel? How is your react app being setup: did you bootstrap it using CRA or a similar boilerplate? – Terry Oct 23 '22 at 09:11
  • Does this answer your question? [Webpack cant compile ts 3.7 (Optional Chaining, Nullish Coalescing)](https://stackoverflow.com/questions/58813176/webpack-cant-compile-ts-3-7-optional-chaining-nullish-coalescing) – Terry Oct 23 '22 at 09:14
  • I am using babel @Terry – Papa Kow Dadson Oct 24 '22 at 22:18

0 Answers0