JustFly1984 / react-google-maps-api

React Google Maps API
MIT License
1.82k stars 440 forks source link

in latest version i having this issued when i updated it #3384

Open hpsthr opened 1 month ago

hpsthr commented 1 month ago

ReferenceError: require is not defined in ES module scope, you can use import instead This file is being treated as an ES module because it has a '.js' file extension and 'node_modules/@react-google-maps/api/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension

this is the versions of my nextjs

"@react-google-maps/api": "2.19.3", changed to "^2.20.1" ( got this error and restore it to old version and problem is resolve) "next": "14.2.9", "react": "^18", "react-dom": "^18", "react-tooltip": "^5.28.0",

i am posting this first time. So don't know the rules. just want to remind you about there is problem in new version.

JustFly1984 commented 1 month ago

@hpsthr Totally forgot nextjs is failing on that. Please try 2.20.2 - released a minute ago.