ReactS3Uploader.propTypes is undefined when deployed on Heroku
Opened this issue · 3 comments
The issue:
This line throws an error when we deploy the app on Heroku: https://github.com/odysseyscience/react-s3-uploader/blob/master/ReactS3Uploader.js#L116
The issue is that Object.keys
method can't be called on undefined
, hence ReactS3Uploader.propTypes
is undefined
only on staging and production. There are no errors when testing locally.
I have forked the plugin and provided a hacky workaround: DemitryT@12fa42f
However, I'm really curious why this is happening for us only after we deploy and not in development.
Happy to provide more details, but here's some relevant info:
Server: heroku-18 (ruby and nodejs buildpacks added)
Node v10.19.0
npm v6.9.0
yarn v1.22.4
Using react-s3-uploader v4.9.3
Workaround seems to do the trick, but we won't get the latest updates in the package with my fork. Curious to see if you've seen this before and what the possible causes might be.
Hi @DemitryT did you ever figure this out? I'm facing the same issue.
@adriandiaz Yup, I'm just using my forked component with a workaround: https://github.com/DemitryT/react-s3-uploader
@DemitryT awesome, I've deployed with your version and it works great. Thanks so much!