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

ReactS3Uploader.propTypes is undefined when deployed on Heroku #219

Open
DemitryT opened this issue Jun 16, 2020 · 3 comments
Open

ReactS3Uploader.propTypes is undefined when deployed on Heroku #219

DemitryT opened this issue Jun 16, 2020 · 3 comments

Comments

@DemitryT
Copy link

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.

@adriandiaz
Copy link

Hi @DemitryT did you ever figure this out? I'm facing the same issue.

@DemitryT
Copy link
Author

@adriandiaz Yup, I'm just using my forked component with a workaround: https://github.com/DemitryT/react-s3-uploader

@adriandiaz
Copy link

@DemitryT awesome, I've deployed with your version and it works great. Thanks so much!

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

2 participants