creativetimofficial / ct-soft-ui-pro-react-native

Start your development with a Design System for React-Native inspired by Soft UI Design System.
https://www.creative-tim.com/product/soft-ui-pro-react-native
15 stars 3 forks source link

[Bug] React native project fails to build on clean install on web #4

Open sergioisidoro opened 2 years ago

sergioisidoro commented 2 years ago

Version

1.0.0

Reproduction link

https://github.com/creativetimofficial/ct-soft-ui-pro-react-native/issues/3

Operating System

Big Sur 11.5.2

Device

Macbook air M1

Browser & Version

Chrome (latest), Brave (latest)

Steps to reproduce

  1. Download repo
  2. yarn install
  3. expo stat

    What is expected?

    Project to compile without errors.

    What is actually happening?

    TypeError: Object(...) is not a function on

const RNCMaskedView = requireNativeComponent('RNCMaskedView');


Solution

It seems the issue has been reported here. I wonder if pinning masked view to the previous version would help. It is also possible that this is due to this project using the old version of the package, as this comment mentions:

https://github.com/react-native-masked-view/masked-view/issues/130 https://github.com/react-native-masked-view/masked-view/issues/142#issuecomment-970501421

You are probably using the old package name @react-native-community/masked-view instead of @react-native-masked-view/masked-view

Additional comments

sergioisidoro commented 2 years ago

Clarification: this seems to be related to the react native web. And masked view, as well as other dependencies seem to not support it. It was wrong to assume this would work immediately on react native web.

Maybe adding a warning or a documentation that this not yet work in React Native web would maybe save some time to someone :)