Closed neilgamb closed 2 years ago
This should go in the relevant repo, being three-mesh-bvh.... We can't do anything about it in this repo I don't think.
Although if it came to it I suppose we could move it to web only. But I feel like it's a straight forward fix for the other maintainer.
'... /three-mesh-bvh/build/index.umd.cjs(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json)'
From the three-mesh-bvh
team:
"Specifically it seems that expo is not trying to load index.umd.cjs (which exists if you look in the directory) and instead trying a variety of other extensions on the provided file instead, which is odd. The cjs extension is one of the recommended ways from node.js for distinguishing and supporting commonjs "require"-style files compared to modules (mjs) files."
You should be able to solve this issue by adding cjs
to your sourceExts
in the babel config
Indeed, this is an issue with your metro configuration. See R3F's native installation instructions if you run into further trouble.
three
version: "^0.134.0"@react-three/fiber
version: "^8.0.0-beta-02",@react-three/drei
version: "^7.22.1",node
version: 14.17npm
(oryarn
) version: yarn 1.22.5expo
version: "~43.0.2",Problem description:
I just installed three, r3f and drei in an expo app via the instructions here.
The app is running on both native and web via expo's react-native-web interface. So far everything is working OK on web.
When importing
import { useGLTF, Center } from '@react-three/drei/native'
however, I am getting the following error message on the native device (iPad):Suggested solution:
none so far sorry