Error: undefined Unable to resolve module react-spring/nativeSee original GitHub issue
- As soon as I installed the package on my
react-nativeapplication, I started getting this issue, which is in the screenshot.
- Tried doing these to remove the error:
rm -rf node_modules && rm -rf package-lock.json cd ios && rm -rf Pods && rm -rf Podfile.lock && cd .. npm install cd ios && pod install react-native start --reset-cache [in one terminal] npm run ios [in another terminal]
I also, visited to see if I can install the missing package from this link @react-spring/native, but the docs says:
Note: This package is not compiled before being published, because Metro handles that for us, which means we get proper sourcemap support!
Did not work out for me. Still the same issue. My app is breaking. Any help would be highly appreciated.
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@Luca8991 the reasons is that you use the 9-th version of the react-spring. It doesn’t contain native part. Please, just downgrade it to “8.0.27” as in the sample project: https://github.com/3DJakob/react-native-tinder-card-demo/blob/master/package.json
It helped me.
Hey sorry for the late reply! The native version depends on react-spring however not the react version. Because of this, it would be a bad idea to include it in our module taking up unnecessary space for React users. Try running
npm install react-spring and it should hopefully work.