question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import error after build

See original GitHub issue

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?

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
dylanvorstercommented, Mar 21, 2017

no, because peer dependencies are bad 😛

1reaction
ghostcommented, Feb 2, 2018

@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?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build failed to compile - Attempted import error - Stack Overflow
Attempted import error: 'decrypt' is not exported from '../../../../util/security' (imported as 'decrypt'). This error only appears when I try ...
Read more >
How do I fix compile or build errors after importing a custom ...
Right-click on Assets -> Import Package -> Custom Package and select wvr_unity_sdk. ... you still might encounter a compile error or build failure....
Read more >
module-not-found - Next.js
The module you're trying to import is not installed in your dependencies ... When importing a module from npm this module has to...
Read more >
Project Import and Build errors in CCS
This error appears when the compiler include path specified in CCS involves a variable or macro and the variable is not resolved properly....
Read more >
Fix ModuleNotFoundError (No Module Named CV2) Python ...
Fix ModuleNotFoundError (No Module Named CV2) Python Import Error (If ... No module named cv2 after trying to fix it with this video ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found