react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

'React/RCTDefines.h' file not found

Open riwu opened this issue 7 years ago • 11 comments

Environment

Environment: OS: macOS Sierra 10.12.6 Node: 8.6.0 Yarn: Not Found npm: 5.5.1 Watchman: 4.7.0 Xcode: Xcode 8.3.3 Build version 8E3004b Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed) react: 16.0.0-beta.5 => 16.0.0-beta.5 react-native: https://github.com/expo/react-native/archive/sdk-22.0.1.tar.gz => 0.49.3

Target Platform: iOS (10.3)

Build error

'React/RCTDefines.h' file not found

Steps to Reproduce

  1. git clone https://github.com/riwu/react-native-eject (fresh Expo app + detach + pod install + npm i react-native-vector-icons + react-native link)
  2. npm install
  3. open project in ios folder
  4. build project

I searched around for this issue and the fix was adding React to Target, but it did not fix the problem in my case. image

riwu avatar Oct 27 '17 08:10 riwu

have you solved this problem,i have also met. hope help

HuangQiii avatar Nov 13 '17 06:11 HuangQiii

I am on react-native "react-native": "^0.48.4". And still seeing this problem. Any solutions here ?

ahetawal-p avatar Nov 16 '17 06:11 ahetawal-p

i solve it i update my npm and node,then install the latest version of react-native-vector-icons,after link,everything runs

HuangQiii avatar Nov 16 '17 10:11 HuangQiii

This is most likely due to improper linking of RNVI/React. Please stick to either cocoapods or regular linking not both.

oblador avatar Jan 08 '18 22:01 oblador

I updated latest version for both node and npm, but still seeing this problem

hoaibkdn avatar Feb 21 '18 04:02 hoaibkdn

Even today I am having this annoying problem.

npm version { bbGO: '0.0.1', npm: '6.9.0', ares: '1.15.0', cldr: '33.1', http_parser: '2.8.0', icu: '62.1', modules: '64', napi: '3', nghttp2: '1.34.0', node: '10.15.1', openssl: '1.1.0j', tz: '2018e', unicode: '11.0', uv: '1.23.2', v8: '6.8.275.32-node.12', zlib: '1.2.11' }

react-native --version react-native-cli: 2.0.1 react-native: 0.61.1

npm list react-native-vector-icons [email protected]

co-de avatar Oct 08 '19 10:10 co-de

@co-de also seeing this after updating to react-native: 0.61.2, react-native-vector-icons:6.6.0 and re-linking

MattyK14 avatar Oct 11 '19 19:10 MattyK14

@co-de also seeing this after updating to react-native: 0.61.2, react-native-vector-icons:6.6.0 and re-linking

It's likely that your project is linked to an older version of react-native-vector-icons. Your version of React Native should automatically handle the linking. Try unlinking by running react-native unlink react-native-vector-icons and then run pod install in your ios directory.

jererutter avatar Oct 23 '19 05:10 jererutter

Hey guys, I ran this: react-native unlink react-native-vector-icons and then this: react-native link in the root of my project and that resolved it for me.

ifeanyilawrence avatar Nov 11 '19 17:11 ifeanyilawrence

This is the only solution that worked for us (after fighting for days with this issue). FYI, the react-native version is 0.61.5 Step1: rm -rf ./node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m normal Step 2: rm -rf ./ios/build/<YOUR_PROJECT_NAME>/Build/Intermediates.noindex/RNVectorIcons.build/Debug-iphonesimulator/RNVectorIcons.build/Objects-normal/x86_64/RNVectorIconsManager.o Step 3: rm -rf ios/build Step 4: rm -rf ios/Pods Step 5: cd ios; pod install; Step 6: Now, building the project will work fine.

Although this isn't the permanent solution, it will unblock you if you're stuck.

dhivyada avatar Dec 20 '19 05:12 dhivyada

thanks @dhivyada it works !

Patzelly avatar Oct 11 '21 15:10 Patzelly