react-carousel: App throws error on Building with npm run build
Describe the bug
After I build my app which is using react-carousel for production using npm run build, it gives an error when I try to open the page where react-carousel is used.
The error screenshots are provided below
Expected behavior To render the page as it appears during development.
Screenshots

Environment
- node 14.4.0, npm 6.14.5, react-carousel 2.0.1
- Desktop Windows 10
- Edge, Chrome
Please look into this. Its a great library and the best one for my purpose but this error blindsided me.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 14
- Comments: 20 (9 by maintainers)
I got this working by
yarnyarn buildreact-carousel/libinto my project’snode_modules/@brainhubeu/react-carousel/libfolder and overwriting the existing files.After rebuilding my create-react-app project, everything seems to work.
Please merge that PR, this is quite annoying bug
Please try again with the latest commit (https://github.com/brainhubeu/react-carousel/pull/646/commits/7815c7e3745a4198a71eb7c7648f638236dd45a0) in my PR. It seems bumping recoil to at least
^0.0.11fixes the read-only issue, while setting webpack to use production mode correctly ensures it reads from the production version.