milespratt / bingmaps-react

An easy to use Bing Maps React component.
https://bingmaps-react.netlify.app
MIT License
21 stars 19 forks source link

Error - Module not found #53

Open edwardkeay opened 2 years ago

edwardkeay commented 2 years ago

HI,

I am building a spfx react webpart and have installed using npm install bingmaps-react

I have imported using the below Image 104

Added the following into the component Image 105

however when I run gulp serve I get the follow error Image 102

Please advise a resolution or guidance

Thanks in advance

milespratt commented 2 years ago

@edwardkeay I'm happy to take a look. Is it possible to put your code in a repository so that I can take a look at it myself?

byronthe123 commented 2 years ago

@edwardkeay - I had the same issue but was able to fix it by installing core-js (https://www.npmjs.com/package/core-js).

edwardkeay commented 2 years ago

@milespratt I have shared my respository with you. thanks for your help

milespratt commented 2 years ago

@edwardkeay any chance you've taken a look at @byronthe123 's suggestion?

dwarthen-tnn commented 2 years ago

I was having this issue and @byronthe123's suggestion worked for me. I'm also in the SPFx environment.

What I'm finding now is that I cannot pan the map by clicking & dragging. Middle clicks and double clicks will center and zoom, but clicking & dragging does this instead: image

milespratt commented 2 years ago

@dwarthen-tnn would you mind sharing your code?

dwarthen-tnn commented 2 years ago

@dwarthen-tnn would you mind sharing your code?

Thanks for the quick response. I just realized the problem. I had implemented a Office UI Fabric List at nearly the same time I impemented the React Bingmap and it looks like some styling on the List component replaced the click & drag functionality on the whole page. I'm all set for now.

Installing the core-js package does seem to resolve the module not found error reported here.

Thanks again :)