0

all dependencies are installed and using supported versions. and also a right component import and use right (copy & paste from documentation) ---> when I run from my project this error happen


Failed to compile ./node_modules/@react-leaflet/core/esm/path.js 10:41 Module parse failed: Unexpected token (10:41) 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.
 |    useEffect(function updatePathOptions() {
 |        if (props.pathOptions !== optionsRef.current)
             {const options = props.pathOptions ?? {};
              |element.instance.setStyle(options);
              |optionsRef.current = options;
  • 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 Jan 21 '22 at 14:59
  • I read whole answer do all - but it doesn't work. – mohsen Ghalandar Jan 22 '22 at 07:31

0 Answers0