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.

(npm link) Element ref was specified as a string (value0) but no owner was set.

See original GitHub issue

@JedWatson I’ve used your plugin extensively, it’s awesome and I’ve never really had a problem with it. Now I’m building a component library, using your plugin for my Select menu. Everything works fine if I import my component library from node modules, but if i use npm link {library} then I get the following error onChange:

Uncaught Error: Element ref was specified as a string (value0) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).
    at invariant (invariant.js:42)
    at coerceRef (react-dom.development.js:6736)
    at createChild (react-dom.development.js:6998)
    at reconcileChildrenArray (react-dom.development.js:7303)
    at reconcileChildFibers (react-dom.development.js:7672)
    at reconcileChildrenAtExpirationTime (react-dom.development.js:7780)
    at reconcileChildren (react-dom.development.js:7771)
    at updateFragment (react-dom.development.js:7808)
    at beginWork (react-dom.development.js:8273)
    at performUnitOfWork (react-dom.development.js:10244)
    at workLoop (react-dom.development.js:10308)
    at HTMLUnknownElement.callCallback (react-dom.development.js:540)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:579)
    at invokeGuardedCallback (react-dom.development.js:436)
    at renderRoot (react-dom.development.js:10386)
    at performWorkOnRoot (react-dom.development.js:11000)
    at performWork (react-dom.development.js:10952)
    at batchedUpdates (react-dom.development.js:11070)
    at batchedUpdates (react-dom.development.js:2323)
    at dispatchEvent (react-dom.development.js:3414)

In Redux DevTools, I can see the value changing, and then immediately I get the @@redux-form/DESTROY action. I also have react-datetime and a few other plugins which are not having this issue when I use npm link

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mo-ibcommented, Jan 13, 2018

I have the same issue with only this plugin.

2reactions
tthewcommented, Mar 2, 2018

A less than ideal but effective workaround I’ve found is to delete the node_modules/ directory from the linked package when testing the library in an app implementation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Element ref was specified as a string (map) but no owner ...
According to react documentation on version 16.3 changes, the legacy string ref api is deprecated and now you should use the ref callback ......
Read more >
Are you reporting a bug or runtime error?
Element ref was specified as a string (value0) but no owner was set. You may have multiple copies of React loaded.
Read more >
Refs Must Have Owner Warning
Element ref was specified as a string (myRefName) but no owner was set. ... (conflicting) copies of React loaded (eg. due to a...
Read more >
[Solved]-Element ref was specified as a string ...
Coding example for the question Element ref was specified as a string (clickAwayableElement) but no owner was set-Reactjs.
Read more >
<input>: The Input (Form Input) element - HTML
If any is not explicitly set, valid values for the number , date/time input types, and range input types are equal to the...
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