drei: Unable to resolve "@mediapipe/tasks-vision" from "node_modules/@react-three/drei/index.cjs.js"
three
version: 0.155.0@react-three/fiber
version: 8.13.6@react-three/drei
version: 9.80.1node
version:npm
(oryarn
) version: 9.81
Problem description:
I get the following error when trying to use this library:
Unable to resolve "@mediapipe/tasks-vision" from "node_modules/@react-three/drei/index.cjs.js"
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 15
I had the same problem using
my solution is to simply, just add ‘mjs’ in sourceExts, like so:
After adding metro.config.js I encountered a similar problem as @Osmanity and @blackroom24
but my logs say:
` ERROR ReferenceError: Property ‘document’ doesn’t exist, js engine: hermes ERROR Invariant Violation: “main” has not been registered. This can happen if:
AppRegistry.registerComponent
wasn’t called., js engine: hermes`I can’t use anything from drei package regardless of the package versions used.
Anyone know how to deal with this?
@Grano22 Hey I tried editing metro config to include modules but after building the app I ran into these 2 errors
AppRegistry.registerComponent
wasn’t called., js engine: hermesI’ve only received this on React Native. My solution: roll back to an older version without FaceControls