React Native this._lazyCallableModules[name] is not a function - javascript

I had a fully functioning react native app, and I tried to install the Facebook Login button. I followed these instructions:
https://developers.facebook.com/docs/react-native/login
and
https://developers.facebook.com/docs/react-native/configure-ios
There is a known issue using react-native link to connect the Facebook SDK to the project, and so I tried linking it manually. I could not get the Facebook Login to work, and now when I use react-native run-ios, my app just shows a black screen!
As a test, I used create-react-native-app to create a new app, and I launched it, and I'm getting this error:
this._lazyCallableModules[name] is not a function (MessageQueue.js 155:11)
Since I'm not sure what MessageQueue is and this is a brand new app, I'm not sure how to undo the damage I've done.
Has anyone experienced this, or do you at least have some idea of how I can go about resetting my react setup?
If I haven't given enough relevant information, please let me know.

Followed the answer given here and it's working well so far.
Downgrade the babel-preset-react-native package from 2.0.1 to 2.0.0. The command is npm install babel-preset-react-native#2.0.0. Use the --save flag if you want to store it to your package.json.

Updating to the latest React Native, clean & build solved it for me.

Related

How to resolve a missing library on react-native?

Image libraries
Image Error
I'm following this tutorial https://www.youtube.com/watch?v=Ov3Z3vD5zFw&t=202s to make a Chat App, i didn't change any part of the tutorial but i got this error. The only difference between the tutorial and my code is his project was made on Expo, and mine was make normally.
I uninstall and reinstall the #react-navigation/stack, and update it, but now i don't know what to do.

React Native: Convert an Expo bare project to a pure react native app

TL;DR
Similar questions have been asked before on SO (such as Convert Expo project to Original React Native project, Commands to use after converting from expo to react-native-cli, and Expo to react native init) but none of them explain how to completely remove all Expo modules and dependencies from my project, so that I end up with a pure React Native app (the same as if I had run react-native init... in the first place).
So is it possible to remove all of this extra crap that I never asked for or expected to be installed, with one simple command? MTIA! :-)
Background
Basically I got into this mess by ejecting from a managed Expo project, then customising the android folder a lot before realising that my build/install times were ludicrously slow.
So to fix this, I ran yarn global add depcheck and depcheck, which suggested that I could/should remove all of the following packages (the most seemingly-important ones are marked with an asterisk):
expo-updates*
filtrex
firebase-admin
lodash
mathjs
moment
native-base
nodemailer
react-native-android-location-enabler
react-native-credit-card-input
react-native-document-picker
react-native-fast-image
react-native-geolocation-service
react-native-image-crop-picker
react-native-js-bottom-sheet
react-native-reanimated
react-native-signature-capture
react-native-unimodules*
react-native-web
react-timer-mixin
recyclerlistview
shortid
stripe-client
styled-system
#babel/core
#react-native-community/eslint-config
babel-jest
jest
prettier
react-test-renderer
So I blindly ran yarn remove ... on all of those packages, and now I get a ton of errors on attempting to build. I won't list them here since it's obvious that they're mostly (if not entirely) related to the expo-updates and react-native-unimodules packages marked above.
I'm not explicitly using anything Expo-related in my code, so this should be a cake walk IMO, but is proving to be quite difficult!
So how can I remove this extra cruft properly? Do I need to start fresh with react-native init? MTIA :-)
Ejected expo projects needs unimodules to function properly.so i don't think there is a simple command that does everything you asked for. You can follow some steps to get it working.
Branch out for safety.
Eject, check if it is working and commit.
Delete all except .git folder in the project(also can keep a copy of .git somewhere else if project is not stored remotely).
Do initiate a bare react-native project to the same folder(have to do it from parent folder with same project name as the current project folder name, it will prompt the folder is not empty. choose to continue).
Discard the deletion of the files with your Codes.
Add packages that use in project(for expo packages, find replacement packages. Most probably will be mentioned in expo documentation).
Run Project, (might get some missing dependencies.if so, add and rerun)
I have finally acheived this almost 6 hours later by:
Creating a new React Native app from scratch (react-native init MyAppName).
Finding replacements for all the Expo modules that were being used (not by me directly, but by other packages).
Reconfiguring my Firebase project to play nice with the app (particularly the SHA keys).
Uninstalling the old app, installing the new and clearing caches for the "new" app (I say "new" because I didn't expect this step to be necessary, but somehow, for some stupid reason, Android was trying to use the old, cached app files).
The last step was absolutely crucial; it took me about 2 hours of head scratching and screaming at the PC before I finally stumbled upon this: React Native white blank screen issue. Many thanks to #DiwakarPrasad for this absolute gem of knowledge!

TypeError: undefined is not an object(evaluation'_this.props.navigation.openDrawer')

I'm new to programming and I am going through some problems I can't fix. I hope some of you can help.
I'm getting the error message:
TypeError: undefined is not an object(evaluation'_this.props.navigation.openDrawer')
as I am trying to click on my navigator. I want to navigate from my Profile view to Booking View.
I tested your app and I just had the login page with no drawer so it seems that the second render() method of your App class overrides the first one.
Then I deleted the second render() method on App.js
Then I tested again your source code : the drawer works fine on Android, iO, chrome and Firefox, it opens whenever the user clicks on the forwardburger icon.
So I bet that your issue is having two render() methods.
If not, here are the steps that led me to make your project work in isolation :
expo init
-> on interactive questions of expo init, I set the name to « openDrawer_problem » then the template to « blank »
expo install firebase
expo install expo-constants
expo install react-navigation
expo install react-navigation-drawer
expo install #expo/vecto-icons
expo install react-native-paper
expo install react-native-screens
expo install react-native-gesture-handler
expo install react-native-reanimated
expo start
Side notes on your question :
CRITICAL - You have two render() methods in App.js !! The second overrides the first.
WONDERING - You exposed your firebase access on the internet. could it be misused ? I don't know anything about firebase, it just puzzled me.
FYI - Your code misses the dependency "./components/LoginForm » and "./components/SignUpForm". It would be nice to get it working out of the box.I had to mock them.
IMPORTANT - Unles you get a valid reason, your file extensions would better all be standard (lowercase, i.e. .js ). Apparently, .Js extensions are not recognized by the module loader. I had to replace .Js -> .js
Let me know if this solves your problem, I am curious ;)

How to get lattitude longitude points of users current location when app is inactive or closed in react native android?

Thanks In advance..!
I am developing a app using react native expo, this application needs to track user current location when app is foreground or background or killed.
in any state i need to track the user current location.
I have tried some code and followed some plugins but no use.
Can any one help me, how to track the location in background using react native?
Upgrade to Expo SDK v32.0.0 to use this feature
You can now use simple javascript lines to get updates on location in the background, and also trigger geofencing task when device leave or enter a location.
Upgrading your SDK - for further steps
Upgrading Your App-
Close your Expo CLI server
In app.json, change sdkVersion to "32.0.0"
In package.json, change these dependencies:
react-native to
"https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
expo to "^32.0.0"
react to "16.5.0" — (this exact version)
react-navigation to "^3.0.9" (if you use it — this is also optional,
you don’t have to update it to use the newest SDK. If you choose to,
make sure you read the changelog for breaking changes, and see this
upgrade guide for upgrading from v2 to v3.)
jest-expo to "^32.0.0" (if you use it)
sentry-expo to "~1.9.0" (if you use it)
Delete your project’s node_modules directory and run npm install again (or use Yarn, we love Yarn)
Run expo start -c
Update the Expo app on your phones from the App Store / Google Play. expo-cli will automatically update your apps in simulators.
Make sure to check the breaking changes section of this post!
If you built a standalone app previously, remember that you will need to create a new build in order to update the SDK version.
Run expo build:ios or expo build:android when you are ready to do a new build for submission to stores.
If you are planning to submit your iOS app to the App Store, you must upgrade to Xcode 10 in order to do so.
I think we all agree that this is a "highly requested feature". The problem is W3C, IETF, and in particular Jake Archibald refuse to acknowledge it :-(
If they just spec'd the TravelManager (analogous to PushManager for background notifications) as it is DETAILED here you could have Background Geolocations without ANY plugins!
No Cordova, No Expo, No PhoneGap, and No Native App requirement.
Can anyone explain why W3C and IETF simply refuse?

Meteor.js can't find semantic:ui package

I'm looking at using Semantic UI in my meteor projects. When I try to run: meteor add semantic:ui I get an error from the terminal saying that the package doesn't exists, yet according the Semantic UI GitHub page it should?
semantic:ui is now Depcrecated , like they point on the nooitaf:semantic-ui package Atmosphere README
try with
meteor add semantic:ui-css
Using Deprecated (not a good choose)
meteor add nooitaf:semantic-ui
We're currently working on relaunching the package. We didnt correctly build the LESS theming into meteor's pipeline in the original package so it did not add any particular value over using semantic:ui-css.
The new package should launch in the next couple days and support theming.
Edit: We just launched the new package, won't be going away again :)
https://atmospherejs.com/semantic/ui

Categories