react-carousel icon indicating copy to clipboard operation
react-carousel copied to clipboard

[BUG] Fails on npm build

Open RonLek opened this issue 4 years ago • 1 comments

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
  1. 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

  • 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.

RonLek avatar Mar 23 '21 15:03 RonLek

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

RonLek avatar Mar 23 '21 15:03 RonLek