-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
Component no longer runs after being installed as a node module #3320
Comments
Seems odd… cc @spicyj @sebmarkbage |
One thing that I noticed is that you're using the minified file in your |
This is the weird part. If I copy-paste the content of either |
I disabled uglification so The cause of the invariant violation is that the |
Fixed this by specifying React as a peer dependency rather than a normal dependency in |
I had this issue but I think it was caused by a library expecting something as a commons chunk |
I have a reusable component
Chart
which I decided to put it up on GitHub. The weird thing is, although it's the exact same file, it works flawlessly while being part of my original project:But it's not working at all once I pull it down as a node package:
The error given is
Uncaught Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's
rendermethod). Try rendering this component inside of a new top-level component which will hold the ref.
but I am not sure if I understand it. Is this intended behavior?The text was updated successfully, but these errors were encountered: