react-diagrams: Import error after build

I’ve got an error while importing brand new built library. It completely ok with importing your git version. But I got an error after importing a library just right after built with webpack command. Even if no any single change.

Uncaught (in promise) Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
    at invariant (invariant.js:38)
    at Object.addComponentAsRefTo (ReactOwner.js:68)
    at attachRef (ReactRef.js:23)
    at Object.ReactRef.attachRefs (ReactRef.js:42)
    at ReactDOMComponent.attachRefs (ReactReconciler.js:23)
    at CallbackQueue.notifyAll (CallbackQueue.js:76)
    at ReactReconcileTransaction.close (ReactReconcileTransaction.js:80)
    at ReactReconcileTransaction.closeAll (Transaction.js:206)
    at ReactReconcileTransaction.perform (Transaction.js:153)
    at ReactUpdatesFlushTransaction.perform (Transaction.js:140)

Do you have any idea what could be wrong?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (17 by maintainers)

Most upvoted comments

no, because peer dependencies are bad 😛

@dylanvorster hi, I’m trying use babel-plugin-lodash to reduce the size of lodash chunk in my project. I can’t because react-diagrams embedded the whole package in distribution build… I’m using lodash v 4.17.4.

How can I resolve this scenario? (you says peer dependencies are bad, why?)

Thank you for such full answer