This dependency makes it impossible to use plotly.js in the browser because image-size uses fs module which is not available in browsers. I do not know how does react-plotly.js adapt to this dependency but I guess they have this issue too.
Related to: #5119.
Reproducible example
- Create an app with
create-react-app.
- Install dependencies from the screenshot below (you might need to change the React and ReactDOM packages' versions too), including
plotly.js@1.57.1 and use it as a dynamic import with @loadable/component.
- Run
yarn start in the project directory.
Screenshot

Expected output
The app runs well without terminal or browser errors.
Actual output
Error inside browser window:

Update
The essence of this issue is here: #5243 (comment)
This dependency makes it impossible to use plotly.js in the browser because image-size uses fs module which is not available in browsers. I do not know how does react-plotly.js adapt to this dependency but I guess they have this issue too.
Related to: #5119.
Reproducible example
create-react-app.plotly.js@1.57.1and use it as a dynamic import with@loadable/component.yarn startin the project directory.Screenshot
Expected output
The app runs well without terminal or browser errors.
Actual output
Error inside browser window:
Update
The essence of this issue is here: #5243 (comment)