react-tinder-card icon indicating copy to clipboard operation
react-tinder-card copied to clipboard

Error: undefined Unable to resolve module react-spring/native

Open alok-careerlabs opened this issue 4 years ago • 5 comments

  • As soon as I installed the package on my react-native application, 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.

Simulator Screen Shot - iPhone 12 - 2021-06-15 at 17 18 30

alok-careerlabs avatar Jun 15 '21 11:06 alok-careerlabs

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.

3DJakob avatar Jul 02 '21 10:07 3DJakob

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.

@3DJakob it doesn't work anyway, maybe because the native module of react-spring can be found at @react-spring/native and not at react-spring/native?

ilbertt avatar Jul 08 '21 17:07 ilbertt

@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.

Danilqa avatar Jul 24 '21 04:07 Danilqa

is native part planned to be included into 9th version? Cause 8th was updated in 2019

kmalyshev avatar Jan 02 '22 09:01 kmalyshev

i installed react-spring package in my project and miraculously worked for me :) npm install react-spring

EsrafilElahi avatar May 04 '22 14:05 EsrafilElahi