Robert
Robert

Reputation: 3880

Invariant Violation: Native component for "RCTImageView" does not exist

I created native project with one 'main' page in Xcode, rest of the project I would like to finish in React Native. Everything went great until I tried to use <Image> tag in JSX. I tried to find solution, but without effects.

If I create the project fully in React Native (without existing part in Xcode) <Image> tag works perfectly.

enter image description here

Upvotes: 4

Views: 2844

Answers (1)

Robert
Robert

Reputation: 3880

I figured out where was the problem located. I hadn't added 'RCTImage' to my Podfile

    pod 'React', :path => './node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', 
    'DevSupport',
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket',
    'RCTImage', // <- this component was missing
  ]

Upvotes: 5

Related Questions