Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Fails on npm build #684

Open
RonLek opened this issue Mar 23, 2021 · 1 comment
Open

[BUG] Fails on npm build #684

RonLek opened this issue Mar 23, 2021 · 1 comment

Comments

@RonLek
Copy link

RonLek commented Mar 23, 2021

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
Copy link
Author

RonLek commented Mar 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant