Open peterchen16 opened 1 year ago
./node_modules/@react-leaflet/core/esm/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;
this is my package.json:
{ "name": "abc", "version": "0.1.0", "private": true, "dependencies": { "@react-leaflet/core": ">=1.0.0 <1.1.0 || ^1.1.1", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "leaflet": "^1.9.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-leaflet": ">=3.1.0 <3.2.0 || ^3.2.1", "react-scripts": "^2.1.3", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "dev-start": "docker-compose -f docker-compose.dev.yml up --build", "dev-restart": "docker-compose -f docker-compose.dev.yml down && docker-compose -f docker-compose.dev.yml up --build" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": [ ">0.2%", "not dead", "not op_mini all" ], "devDependencies": { "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6" } }
Have you tried updating to v4?
this is my package.json:
{ "name": "abc", "version": "0.1.0", "private": true, "dependencies": { "@react-leaflet/core": ">=1.0.0 <1.1.0 || ^1.1.1", "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "leaflet": "^1.9.4", "react": "^18.2.0", "react-dom": "^18.2.0", "react-leaflet": ">=3.1.0 <3.2.0 || ^3.2.1", "react-scripts": "^2.1.3", "web-vitals": "^2.1.4" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", "dev-start": "docker-compose -f docker-compose.dev.yml up --build", "dev-restart": "docker-compose -f docker-compose.dev.yml down && docker-compose -f docker-compose.dev.yml up --build" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": [ ">0.2%", "not dead", "not op_mini all" ], "devDependencies": { "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6" } }