Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

457
Views
React Google Maps Api :Cannot read properties of undefined reading 'emit'

I want to Include a map with the google-map-react api, but I always get the following error:

google_map.js:428 Uncaught TypeError: Cannot read properties of undefined (reading 'emit') at o.r.componentDidUpdate (google_map.js:428:1) at commitLayoutEffectOnFiber (react-dom.development.js:23232:1) at commitLayoutMountEffects_complete (react-dom.development.js:24578:1) at commitLayoutEffects_begin (react-dom.development.js:24564:1) at commitLayoutEffects (react-dom.development.js:24502:1) at commitRootImpl (react-dom.development.js:26779:1) at commitRoot (react-dom.development.js:26638:1) at finishConcurrentRender (react-dom.development.js:25937:1) at performConcurrentWorkOnRoot (react-dom.development.js:25765:1) at workLoop (scheduler.development.js:266:1)

    import React from 'react'
    import GoogleMapReact from 'google-map-react'
    import {Paper, Typography, useMediaQuery} from '@material-ui/core'
    import LocationOnOutlinedIcon from '@material-ui/icons/LocationOnOutlined';
    import Rating from "@material-ui/lab"
    import useStyles from './styles'

    
    const Map = () =>{
        const classes = useStyles();
        const isMobile= useMediaQuery("(min-width:600px)");
        const coords = {lat:0, lng:0}
        const API_KEY = "############"
        return(
            <div className={classes.mapContainer}>
               <GoogleMapReact
                    bootstrapURLKeys={{ key: API_KEY }}
                    defaultCenter={coords}
                    center={coords}
                    defaultZoom={14}
                    margin={[50, 50, 50, 50]}>
               </GoogleMapReact>
    
            </div>
        )
    }
    
    export default Map;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Seems that this solves the issue:

https://github.com/google-map-react/google-map-react/issues/1116#issuecomment-1150589667

Otherwise, you can do it throw your next.config.(js/ts)

  reactStrictMode: false,
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!