brainhubeu / react-carousel

A pure extendable React carousel, powered by Brainhub (craftsmen who ❤️ JS)
https://brainhub.eu/
MIT License
1.07k stars 164 forks source link

[BUG] Fails on npm build #684

Open RonLek opened 3 years ago

RonLek commented 3 years ago

Describe the bug When I'm trying to do an npm build of my react app and trying to serve it from my express server, the entire layout crashes. It works fine when running in development mode without build.

To Reproduce Steps to reproduce the behavior:

  1. Add the Carousel component as usual.
  2. Do an npm run build and proxy it from the express server. The script I'm using to do this is as follows
    npm run build --prefix ../client && NODE_ENV=production nodemon app.js
  3. The app crashes with the error Error: "a" is read-only.

Expected behavior No error should occur as with running in development.

Screenshots Screenshot from 2021-03-23 21-10-11

Environment

Additional context Works fine in development but breaks when served after build.

RonLek commented 3 years ago

@piotr-s-brainhub could you please take a look?