0

./node_modules/react-leaflet/esm/Pane.js 25:37 Module parse failed: Unexpected token (25:37) 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 parentPaneName = props.pane ?? context.pane; | const parentPane = parentPaneName ? context.map.getPane(parentPaneName) : undefined; | const element = context.map.createPane(name, parentPane); to handle the result of these loaders.

i'm currently getting this error when i run react-leaflet v3.2.1. i'm currently using react v1.0.0. and react-scripts v4.0.3. Please how can i fix this?

Jenyo Jay
  • 11
  • 1
  • Does this answer your question? [How to fix error "Failed to compile : ./node\_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41)"](https://stackoverflow.com/questions/67552020/how-to-fix-error-failed-to-compile-node-modules-react-leaflet-core-esm-pat) – Seth Lutske Aug 13 '21 at 14:51

1 Answers1

0

I followed this steps:
1-https://github.com/facebook/create-react-app/issues/9468#issuecomment-694191642
2-https://github.com/PaulLeCam/react-leaflet/issues/877#issuecomment-842167629
Then it fixed!

cksylr
  • 61
  • 5