I tried to link packages using react native link command as well as manually and what does mean by Recovered References. my unlinked libs are showing there and how to resolve it?.
2.) Unable to link libRNvectoricons.a under Build Phrases > Link Binary With Libraries. could not find option there to link up.
Any help would be greatly appreciated.
Follow these steps:
Delete the node_modules folder inside the project
run npm uninstall react-native-app-auth
run npm install react-native-app-auth --save
run react-native link react-native-app-auth
Then follow these steps (iOS Setup & Android Setup)
Related
When I try to use 'react-native-elements' package in my code, I face this error :
bundling failed: Error: Unable to resolve module react-native-vector-icons/FontAwesome from node_modules\react-native-elements\src\social\SocialIcon.js: react-native-vector-icons/FontAwesome could not be found within the project.
I have done many things to fix it. I installed the 'react-native-vector-icons' again, I used 'rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json' but non of them worked. what should I do to overcome this problem? I really appreciate your help guys.
make sure that you've installed the package with
npm install react-native-vector-icons and link it through
react-native link react-native-vector-icons
then for ios you need to install pod (goto your project ios folder on terminal and enter command pod install)
and then reset packager cache with react-native start --reset-cache
if you are using react version <0.60 use react-native link react-native-vector-icons and do the steps link and if react version > 0.60 then cd ios && pod install && cd .. and try again if its not work delete the build folder and rebuild again.
I integrated react-native-payments library to the my react native app and i have a run time error saying could not invoke ReactNativePayments.show this is the error message
Edit:
I think, I got the proper solution. Actually there is a problem with ReactNativePayments.podspec file, follow the below steps:
Run
npm install react-native-payments --save
Open ReactNativePayments.podspec file and some changes (Refer screenshot below)
Then run link command react-native link react-native-payments
Go to ios folder and run following command
pod cache clean --all and pod install
Please let me know if those solution help you.
Thanks
Alankar Saini
I'm using react-native-gesture-handler within react-navigation and getting this error
null is not an object ( evaluating 'RNGestureHandlerModule.Direction')
Workspace file is automatically created with new React native version(0.60). And there is no libraries under libraries folder in Xcode project.
I created new project in react native and new project created with react-native version 0.60 automatically. Then I installed following dependencies
npm install —save react-navigation
npm install —save react-native-gesture-handler
After installing I am getting runtime error
null is not an object ( evaluating 'RNGestureHandlerModule.Direction')
I also tried to manually link react-native-gesture-handler dependencies with following steps
Right Click Libraries "Add Files to Project"
/node_modules/react-native-gesture-handlers/ios/RNGestureHandler.xcodeproj
Go to build phases and add libRNGestureHandler.a
Run
After that I am getting following errors
-> File not found
-> File not found
Any suggestion for me to fix this?
Did you try using react-native link react-native-gesture-handler?
For me the solution was:
1) react-native link react-native-gesture-handler
2) cd ios
3) pod install
as now, pod is installed automatically into the project with react-native 0.60
If you use RN > 0.60 you don't have to link react-native-gesture-handler manually as it supports autolinking.
For iOS
cd ios && pod install
For further info see issue #671
Please try to link react-native-gesture-handler then fixed this error
try this command for link gesture-handler pluggin
react-native link react-native-gesture-handler
So I'm opening my the existing React Native project. This is the procedure on how I opened my existing React Native project. 1st step, type the location of my project which is in the "D:\rnprojects\firstproject\". 2nd step, "react-native-start". 3rd step, I opened another cmd then locate it again into my project directory then typed "npm start".
Why when I created this project I didn't get this error just when runnning/opening my existing project.
This the error that I got: (with versions)
There is only simple steps can solve your particular scenario issue quickly.
1) Install the React native cli in your project or globally.
npm install -g react-native-cli
OR
npm install react-native --save
then start your project by using this command
npm start
If any dependencies issue please follow the second solution
2) Please make sure you're installed all dependence
yarn install
OR
npm install
under your project directory
I'm pretty sure your issue will fix by using 1st solution Thanks.
it is simple:
1.npm install
2.react-native run-android
Here I guess you have the RN environment to run already on your side.
cd path_to_project
install packages(there are two following ways to install packages).
2.1 yarn install
2.2 npm install
react-native link(optional - you need to run this command if existing project use RN packages which need to link such as
react-native-vector-icons)
optional(if project use pods) cd ios pod install
react-native run-ios or react-native run-android according to the platform which you want to run on.
I don't think above is perfect instruction give you how to run the existing react-native project, But I am pleasure if give me some hints or help to you.
You can find official guide here
Sometimes npm's cache gets confused and need to reset it by using below command:
npm cache clean --force
Also try below command:
npm install --save-dev react-native-cli
Hope it will help you.
I want to use CameraRoll in my react native application.
I've tryed to install it doing :
npm install RCTCameraRoll --save
but i get :
npm ERR! 404
what is the proper way to do it ?
Having just spent two hours on this, it's apparently still confusing nine months after your question.
The official documentation (https://facebook.github.io/react-native/docs/cameraroll.html) points to the linking page which suggests that there's a package to install (which it points out must be referred to in package.json for automatic linking).
RCTCameraRoll is already included in your react-native npm installation (node_modules/react-native/Libraries/CameraRoll). So no need to npm it.
However it's not linked in your Xcode project, so you have to follow the instructions in https://facebook.github.io/react-native/docs/linking-libraries-ios.html for manual linking.
And what about Android? That's not mentioned in the manual linking instructions. No linking seems to be required. import {CameraRoll} from react-native is all that's necessary.