react-carousel
react-carousel copied to clipboard
[BUG] Fails on npm build
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:
- Add the Carousel component as usual.
- Do an
npm run buildand 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
- The app crashes with the error
Error: "a" is read-only.
Expected behavior No error should occur as with running in development.
Screenshots

Environment
- please paste the result of
npx envinfo --system --binaries --browsers --npmPackages '@brainhubeu/*'
System:
OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Memory: 1.82 GB / 15.48 GB
Container: Yes
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
Browsers:
Firefox: 86.0
npmPackages:
@brainhubeu/react-carousel: ^2.0.2 => 2.0.2
- desktop or mobile (which device & OS if mobile)? - Ubuntu 20.04
- Browser [e.g. Chrome, Safari] - Chromium
Additional context Works fine in development but breaks when served after build.
@piotr-s-brainhub could you please take a look?