Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useGLTF in native #2281

Open
rogueturnip opened this issue Dec 30, 2024 · 0 comments
Open

useGLTF in native #2281

rogueturnip opened this issue Dec 30, 2024 · 0 comments
Labels
question Further information is requested

Comments

@rogueturnip
Copy link

I'm trying to get a react native application working that will run web, iOS, android and I'm experiencing an issue, maybe it's a documentation thing but I wanted to check.

According to the documentation I should be using @reac-three/drei/native for any imports. When I do this and try to run on web I get the following error:

Metro error: require() of ES Module /Users/tonymauro/Code/projects/three-fiber/node_modules/@babel/runtime/helpers/esm/extends.js from /Users/tonymauro/Code/projects/three-fiber/node_modules/expo-router/node/render.js.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node&unstable_transformProfile=hermes-stable not supported.
Instead change the require of extends.js in /Users/tonymauro/Code/projects/three-fiber/node_modules/expo-router/node/render.js.bundle?platform=web&dev=true&hot=false&transform.engine=hermes&transform.routerRoot=app&resolver.environment=node&transform.environment=node&unstable_transformProfile=hermes-stable to a dynamic import() which is available in all CommonJS modules.

if I remove the /native it works fine and doesn't seem to cause any errors with iOS/android (altho I'm debugging a three issue there so it might be something still).

I'm using the latest released packages and expo 52. Is this a documentation issue where I should be not using /native if I intend to use web?

Thanks!

@rogueturnip rogueturnip added the question Further information is requested label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant