You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue may not belong here, but it's worth a try. I'm attempting to use react-map-gl inside a Rails project. I'm using this repo as a starting point.
After running npm install react-map-gl --save and including the code snippet from the readme, I get this error:
Uncaught Invariant Violation: 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).
After a ton of Googling, it seems that the problem is that two copies of React are being included on the page. However, I can't seem to find the duplicate dependency inside of react-map-gl. Any help would be much appreciated, and sorry if this is not a relevant issue for this project.
The text was updated successfully, but these errors were encountered:
After running npm install react-map-gl --save and including the code snippet from the readme, I get this error: Uncaught Invariant Violation: addComponentAsRefTo(...): ...
@garrettqmartin8 react-map-gl's package.json lists react as a (peer dependency)[https://github.com/uber/react-map-gl/blob/master/package.json#L68] for this very reason (i.e. react-map-gl does not install its own version of react but uses a compatible version installed by the app), so I would first look elsewhere for the problem.
I'll close this out for now until there is more evidence this is react-map-gl related.
This issue may not belong here, but it's worth a try. I'm attempting to use
react-map-gl
inside a Rails project. I'm using this repo as a starting point.After running
npm install react-map-gl --save
and including the code snippet from the readme, I get this error:After a ton of Googling, it seems that the problem is that two copies of React are being included on the page. However, I can't seem to find the duplicate dependency inside of
react-map-gl
. Any help would be much appreciated, and sorry if this is not a relevant issue for this project.The text was updated successfully, but these errors were encountered: