Reputation: 41
Failed to compile
./node_modules/react-leaflet/lib/VideoOverlay.js 10:25
Module parse failed: Unexpected token (10:25)
You may need an appropriate loader to handle this file type.
| var overlay = new LeafletVideoOverlay(url, bounds, options);
| if (options.play === true) {
> overlay.getElement()?.play();
| }
| return createElementObject(overlay, extendContext(ctx, {
Hey, After I updated my Webpack in React I'm left with this error message from Leaflet. I got through all the step, even completely deleted all my dependancys and reinstalled all Modules I need. Also I updated my Browserlist in package.json . I don't relly know what to do anymore. Can Anyone help me?
Package.json
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/leaflet": "^1.9.3",
"@types/react": "^18.2.6",
"gsap": "^3.11.5",
"leaflet": "^1.9.4",
"react-google-recaptcha": "^2.1.0",
"react-leaflet": "^4.2.1",
"react-leaflet-core": "^2.1.1",
"react-leaflet-markercluster": "^3.0.0-rc1",
"react-page-scroll-progress-bar": "^3.0.1",
"react-scrollmagic-r18": "^1.0.3",
"video-react": "^0.16.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": [
">0.2%",
"not dead",
"not op_mini all"
],
"devDependencies": {
"webpack": "^4.28.3"
}
}
Upvotes: 1
Views: 140
Reputation: 41
I completely set up a new Projectand imported all my files and it works again
Upvotes: 0