Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Asinox opened this issue Aug 16, 2018 · 6 comments

Comments

@Asinox
Copy link

Asinox commented Aug 16, 2018

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!

@sunilkumarkm
Copy link

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

ex: resizeMode="contain"

@Q8hma
Copy link

Q8hma commented Dec 3, 2018

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

thnx

@lekhnath
Copy link

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>

@q854284771
Copy link

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

@itgou
Copy link

itgou commented Mar 15, 2019

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!!!

@mengbimao
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants