ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.31k stars 149 forks source link

Invariant Violation: Tried to register two views with same name VRTQuad #117

Closed Saalim95 closed 2 years ago

Saalim95 commented 2 years ago

Environment

  1. Development OS: MacOS Big Sur
  2. Device OS & Version: iOS 14.7 and Android 9
  3. Version: "@viro-community/react-viro": "^2.23.0", and "react-native": "0.61.5",
  4. Device(s): Redmi Note 8 Pro and iPhone XR

Description

Getting this error while running thre app after following all the necessary installation instructions for Android and iOS both. WhatsApp Image 2022-03-29 at 11 14 34 AM

francois-pasquier commented 2 years ago

For some reason you have to import each component you want to use from viro by its direct path.

e.g: /components/something

That said, this doesn't fix the actual issue.

Saalim95 commented 2 years ago

Thanks @francois-pasquier . I am no longer facing this issue.

tjikaljedy commented 2 years ago

I face some problem "react": "17.0.2", "react-native": "0.66.4",

"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "^6.0.9",
"@react-navigation/native": "^6.0.6",
"@react-navigation/stack": "^6.0.11",
"@viro-community/react-viro": "^2.23.0",
tjikaljedy commented 2 years ago

Hi All,

Another workaround downgrade the viro to 2.20.2 , when i tested with react-native 0.65.1 is working

scrolls-mckenzie commented 2 years ago

Hello. I am facing this issue too. Have tried to play with versions of dependencies without success. How did you solve this issue @Saalim95

tjikaljedy commented 2 years ago

Hi Scrolls,

image

under root folder of your apps, need to create react-viro.d.ts (to fix import problem) and react-viro.d.ts as:

declare module '@viro-community/react-viro';

Thx

scrolls-mckenzie commented 2 years ago

Hi Scrolls,

image

under root folder of your apps, need to create react-viro.d.ts (to fix import problem) and react-viro.d.ts as:

declare module '@viro-community/react-viro';

Thx

Hi @tjikaljedy

Thanks for the reply. I had solved the problem by following your post #136 and edited the VRTSurface files and changed it to remove the second instance or VRTQuad being called. That solved the problem for me and I have successfully launched a dev build.

Great work and thanks very much for being active and responding.