react-native-gifted-form icon indicating copy to clipboard operation
react-native-gifted-form copied to clipboard

TypeError: undefined is not an object (evaluating '_reactNative.Image.resizeMode.contain')

Open Asinox opened this issue 6 years ago • 6 comments

Hello there!, first, thank you for this great library.

Now Im trying to follow you example code, and I don't know if I'm missing something here, but I'm facing this issue:

TypeError: undefined is not an object (evaluating '_reactNative.Image.resizeMode.contain')

This error is located at:
    in exports (at UserFormPoliza.js:72)
    in RCTView (at View.js:43)
    in RCTScrollView (at ScrollView.js:1070)
    in ScrollView (at ContainerMixin.js:129)
    in GiftedForm (at UserFormPoliza.js:34)
    in RCTView (at View.js:43)
    in RCTScrollView (at ScrollView.js:1070)
    in ScrollView (at KeyboardAwareHOC.js:397)
    in _class (at Content.js:125)
    in Content (at connectStyle.js:384)
    in Styled(Content) (at UserFormPoliza.js:32)
    in RCTView (at View.js:43)
    in Container (at connectStyle.js:384)
    in Styled(Container) (at UserFormPoliza.js:31)
    in UserFormPoliza (at SceneView.js:9)
    in SceneView (at StackViewLayout.js:563)
    in RCTView (at View.js:43)
    in RCTView (at View.js:43)
    in RCTView (at View.js:43)
    in AnimatedComponent (at StackViewCard.js:12)
    in Card (at createPointerEventsContainer.js:28)
    in Container (at StackViewLayout.js:612)
    in RCTView (at View.js:43)
    in RCTView (at View.js:43)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.js:63)
    in RCTView (at View.js:43)
    in Transitioner (at StackView.js:21)
    in StackView (at createNavigator.js:59)
    in Navigator (at createKeyboardAwareNavigator.js:11)
    in KeyboardAwareNavigator (at createNavigationContainer.js:376)
    in NavigationContainer (at App.js:94)
    in App (at renderApplication.js:32)
    in RCTView (at View.js:43)
    in RCTView (at View.js:43)
    in AppContainer (at renderApplication.js:31)

Any idea (I'm new with RN)

Thanks!

Asinox avatar Aug 16 '18 13:08 Asinox

That's because since 0.56 Image.resizeMode is not exposed anymore. You just need to use the string value instead.

ex: resizeMode="contain"

sunilkumarkm avatar Oct 30 '18 19:10 sunilkumarkm

Hello im new on RN how to fix it ??? can you please help me

thnx

Q8hma avatar Dec 03 '18 07:12 Q8hma

I am also getting this error message when using following code snippet. Need help ASAP.

<GiftedForm.ModalWidget
        title='Title'
        displayValue='title'
      >
        <GiftedForm.SeparatorWidget />

        <GiftedForm.SelectWidget name='title' title='Title' multiple={false}>
          <GiftedForm.OptionWidget title='Male' value='M'/>
          <GiftedForm.OptionWidget  title='Female' value='F'/>
        </GiftedForm.SelectWidget>
      </GiftedForm.ModalWidget>

lekhnath avatar Feb 11 '19 10:02 lekhnath

find the WidgetMixin.js and ModalWidget.js in source code and press ctrl + F to replace Image.resizeMode.contain to 'contain'

q854284771 avatar Mar 14 '19 08:03 q854284771

find the WidgetMixin.js and ModalWidget.js in source code and press ctrl + F to replace Image.resizeMode.contain to 'contain'

Thank you! I solved this problem by your help!!!

itgou avatar Mar 15 '19 01:03 itgou

I think the authorities should fix this(WidgetMixin.js ->Image.resizeMode.contain to 'contain')

mengbimao avatar Dec 27 '19 10:12 mengbimao