nodeca / probe-image-size

Get image size without full download. Supported image types: JPG, GIF, PNG, WebP, BMP, TIFF, SVG, PSD, ICO.
MIT License
978 stars 77 forks source link

Undefined issues with react-scripts 5 / CRA 5.0 #72

Closed FrancoMuniz closed 2 years ago

FrancoMuniz commented 2 years ago

I just updated my create-react-app application to 5.0, but it's causing some libraries to stop working. I guess probe-image-size is used in plotly.js, which is what I use for charts.

When starting my application, I get the following error on the console:

Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
    at Object../node_modules/probe-image-size/lib/common.js

Any ideas on how to fix it? Thanks a lot!

puzrin commented 2 years ago

Sorry, can't help with outer apps. If you insist on bug in this package, please provide a minimal sample (without react and so on)

FrancoMuniz commented 2 years ago

Sorry I didn't get what you mean. The issue is happening inside this module, here's an image: image

FrancoMuniz commented 2 years ago

Seems to be a general issue with CRA since the latest update. Will ask there, thanks! Sorry for the inconvenience.

kmdinake commented 2 years ago

@FrancoMuniz did you manage to resolve this issue?