React-native-reanimated: web: Can't resolve 'react-native/Libraries/Utilities/setAndForwardRef'

Created on 24 Oct 2020  路  3Comments  路  Source: software-mansion/react-native-reanimated

Description

I installed reanimated v2 to my react-native-web project and received this error.

Module not found: Can't resolve 'react-native/Libraries/Utilities/setAndForwardRef' in '/Users/hosseinmohammadi/Documents/GitLab/poolkhord/node_modules/react-native-reanimated/src'

Screenshots

Steps To Reproduce

1.

Expected behavior

Actual behavior

Snack or minimal code example

Package versions

  • React: 17.0.1
  • React Native: 0.63.3
  • React Native Reanimated: 2.0.0-alpha.7
  • NodeJS: 12
馃彔 Reanimated2 馃悶 Bug

All 3 comments

Hi! This error is more a problem of react-native-web, but still Reanimated here uses some private ReactNative API. You can submit a PR that extracts this util to Reanimated or avoids using it if it's possible.

Hi! This error is more a problem of react-native-web, but still Reanimated here uses some private ReactNative API. You can submit a PR that extracts this util to Reanimated or avoids using it if it's possible.

Done, Please check it

In the meantime, while you're waiting for this PR to get merged, you can use patch-package to fix it locally.

Was this page helpful?
0 / 5 - 0 ratings