ReactVision / viro

ViroReact: The AR and VR library for React Native πŸ“³πŸ’™πŸ’›πŸ€πŸ’š
MIT License
1.3k stars 150 forks source link

fix(ui): compiler error after installation #164

Closed theonetheycallneo closed 5 months ago

theonetheycallneo commented 1 year ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch @viro-community/react-viro@2.23.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@viro-community/react-viro/components/ViroSurface.tsx b/node_modules/@viro-community/react-viro/components/ViroSurface.tsx
index eb69913..7b68698 100644
--- a/node_modules/@viro-community/react-viro/components/ViroSurface.tsx
+++ b/node_modules/@viro-community/react-viro/components/ViroSurface.tsx
@@ -96,7 +96,8 @@ export class ViroSurface extends ViroBase<Props> {
 }

 var VRTSurface = requireNativeComponent(
-  "VRTQuad",
+  // "VRTQuad",
+  "VRTSurface",
   // @ts-ignore
   ViroSurface,
   {
diff --git a/node_modules/@viro-community/react-viro/dist/components/ViroSurface.js b/node_modules/@viro-community/react-viro/dist/components/ViroSurface.js
index d381b27..29b9079 100644
--- a/node_modules/@viro-community/react-viro/dist/components/ViroSurface.js
+++ b/node_modules/@viro-community/react-viro/dist/components/ViroSurface.js
@@ -96,7 +96,8 @@ class ViroSurface extends ViroBase_1.ViroBase {
     }
 }
 exports.ViroSurface = ViroSurface;
-var VRTSurface = (0, react_native_1.requireNativeComponent)("VRTQuad", 
+// var VRTSurface = (0, react_native_1.requireNativeComponent)("VRTQuad", 
+var VRTSurface = (0, react_native_1.requireNativeComponent)("VRTSurface",
 // @ts-ignore
 ViroSurface, {
     nativeOnly: {

This issue body was partially generated by patch-package.

robertjcolley commented 5 months ago

Please use 2.23.1. Thank you for the patch!