Open 1ky0ng opened 3 months ago
In AzureMapPopup
, we use renderToStaticMarkup
from react-dom/server to create the popup content. The error occurs within react-dom/server, trying to access ReactDebugCurrentFrame.getCurrentStack
, but ReactDebugCurrentFrame
is undefined.
I'd start by checking why ReactDebugCurrentFrame
is undefined in your development environment. Ensure you’re using the same versions of react and react-dom in your package.json.
As an alternative, you can also try a custom popup implementation that doesn't rely on renderToStaticMarkup
. See https://github.com/Azure/react-azure-maps/issues/182#issuecomment-1824522953 for more details.
@yulinscottkang, thank for the reply.
I added the GeoMapPopup file, referenced on my code above then use it in replacement for AzureMapPopup. It still has an error but it's a new one.
TypeError: Cannot create property '_updatedFibers' on number '0'
@1ky0ng, Which versions of react and react-dom are you using?
@yulinscottkang
"react": "^18.3.1", "react-dom": "^18.3.1"
Here is a screenshot of my package.json
I see react is listed in the devDependencies
of your project. Try moving it to dependencies
along with react-dom.
@yulinscottkang
Already did, but still giving me the same issue.
I created a react control which displays an azure map, its working fine displaying only just the map and pins. But if I included a popup for the details of my pins the error occurred. Here is my code.
` import * as React from 'react'; import { useState, useEffect } from 'react'; import { IInputs } from '../generated/ManifestTypes'; import { Stack } from '@fluentui/react/lib/Stack'; import { AzureMap, AzureMapsProvider, IAzureMapOptions, AzureMapDataSourceProvider, AzureMapLayerProvider, AzureMapFeature, AzureMapPopup } from 'react-azure-maps'; import { AuthenticationType, data, MapMouseEvent} from 'azure-maps-control'; import 'azure-maps-control/dist/atlas.min.css';
`
Here is the details of the error: ErrorDetails.txt