ethanselzer / react-image-magnify

A responsive image zoom component designed for shopping sites.
https://ethanselzer.github.io/react-image-magnify
MIT License
650 stars 160 forks source link

After Gatsby build react-image-magnify wont work #91

Open ghost opened 4 years ago

ghost commented 4 years ago

Locally with npm start I have a working app and react magnify is working fine, but when I run Gatsby build react-magnify feature is not working anymore. Sorry but I have only small amount of info on this issue, only thing I see is that in console I get "TypeError: Cannot convert undefined or null to object" Does anyone have same issue with react-image-magnify and Gatsby build

virissimo commented 4 years ago

I'm having this same issue. Running with gatsby develop command, it works fine. But, when I run with gatsby build and gatsby serve, I get this error:

image

React: 16.10.2 Gatsby: 2.23.22 react-image-magnify: 2.7.4

Coriou commented 4 years ago

There's a bug in ethanselzer/react-cursor-position which is fixed in https://github.com/ethanselzer/react-cursor-position/pull/36

Just need @ethanselzer to merge & publish both packages again

ruben-aguilar commented 4 years ago

Any update on this?

theskillwithin commented 4 years ago

any news?

Coriou commented 4 years ago

I've personally given up waiting on the merge and I don't feel like maintaining the two forks required to publish a fixed version of this package.

I have however found a nice alternative in react-inner-image-zoom.

MilosMladenovicWork commented 4 years ago

Hi guys, I forked package with fix I found and you can get it by typing npm i @milosmladenovicwork/react-image-magnify and using it instead of react-image-magnify. I was having the same problem with page crashing after build. All the best 🙌

wynnethepooh commented 4 years ago

Thank you @MilosMladenovicWork!! I also had this problem and my gatsby application works now :D