React native reanimated throws exception after installing it as a part of react navigation installation.
Unable to resolve module ./Transitioning from C:\Users\mohit.bhasin\Desktop\TribuneTrustt\node_modules\react-native-reanimated\src\Animated.js:
None of these files exist:
* node_modules\react-native-reanimated\src\Transitioning(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* node_modules\react-native-reanimated\src\Transitioning\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
> 1 | import { Image, ScrollView, Text, View } from 'react-native';
2 | import createAnimatedComponent from './createAnimatedComponent';
Anyone knows what's wrong?
I faced the exact same issue today. Turned out cleaning cache fixes it. Here is what I've tried:
npx react-native start --reset-cache
I know the question is poorly written, but I hope it will save someone's 15 minutes.
Related
I am trying to generate a qrcode using the react-native-qrcode-svg library.
My code is extremely simple :
import * as React from 'react'
import { View } from 'react-native'
import QRCode from 'react-native-qrcode-svg'
const qrcode = (props) => {
return (
<View>
<QRCode value="https://www.google.com" />
</View>
)
}
export default qrcode
However, when I execute the code I get the following error : Exception thrown while executing UI block: -[NSDictionaryM firstObject]: unrecognized selector sent to instance 0x600009dd4780
I am having trouble understanding the issue because I followed this video step by step and it is not getting the error.
Any ideas? Thank you
Update:
The reason is conflict peer dependency. Package already has PR to resolve it. And temporary solution until it's merged. But as far as I see it's all done (01/19/23). So just try latest version 6.2.0.
Outdated answer:
You should install latest react-native-svg, which react-native-qrcode-svg depends on. In my case latest expo version 47 doesn't work with react-native-svg 12.5.0 installed by react-native-qrcode-svg 6.1.2. So after expo upgrade I did npx expo install react-native-svg and solve the problem.
I'm trying to add the following package to my project but it causes the error:
'Tried to register two views with the same name RNGestureHandlerButton",
which it doesn't do in my other project and I don't know why.
When I change the import of FlatList from "react-native-gesture-handler", and change to from "react-native" the error mentions but it doesn't work scrolling the list
The package I'm trying to get working:
https://github.com/Bur0/react-native-actions-sheet-picker
Link to changed file where scrolling does not work (On github it is located in /src/components/Picker.tsx):
https://controlc.com/9b7a0988
I installed "react-native-gesture-handler" unnecessarily.
Just uninstall it since I use expo and this package is already in it.
See answer:
Tried to register two views with the same name RNGestureHandlerButton
I'm using React-native to develop a mobile app and got the below issue.
error: Error: Unable to resolve module ../../globals/styles/appColor from .../src/containers/LoginScreen/style.ts:
None of these files exist:
* src/globals/styles/appColor(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
* src/globals/styles/appColor/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
1 | import { StyleSheet } from "react-native";
> 2 | import AppColor from "../../globals/styles/appColor";
This is my Code:
style.ts
appColor.ts
I'm using **RN 0.67.3**
my code still work properly before, but now I'm getting this error,
I don't have any clue to solve this issue.
Any help or suggestions will be appreciated.
New to react native and trying to setup ESLint in my project. I am getting this specific error:
Unable to resolve path to module 'react-native'. (import/no-unresolved)
I searched on SO and found similar threads, but nothing seems to work. I tried cleaning the npm cache as well.
import { AppRegistry } from 'react-native';
There is a red underline on my index.js file in the project root (using Atom editor) and under the word react in the above code snippet.
As per the react native guide
AppRegistry should be required early in the require sequence to make
sure the JS execution environment is setup before other modules are
required.
If you are struggling with es-lint configuration and guess that it's showing false error then you can add .eslinrc file at the root of the project and configure eslint rule as required. I suggest airbnb standard, this guide show full setup here
After upgrading React Native from 0.29 to 0.30, I get this error message. I multiple times deleted node_modules, installed them back again, cleared watchman cache and npm start --reset-cache.
I tried it also on new project with react-native init someProject. The same error. Was this module renamed or deleted? I haven't found any info about it in release notes or in commits.
Thanks for help!
It's no longer needed. onTouchStart, onTouchEnd and onTouchMove are props of Views now.
Look here
I don't know, what really happened to this component.
But, at least, currently on RN 0.30 you can require ReactNativeEventEmitter as follows:
var ReactNativeEventEmitter=require(127);
The following line ...
console.log(ReactNativeEventEmitter)
...will print then this in the console (in Debug-Mode):
(I've figured it out while searching the react-native libraries in "node-modules" in the following file: "./node_modules/react-native/ReactAndroid/src/androidTest/assets/AndroidTestBundle.js:13879", and it is also working under iOS [the screenshot above originates from iOS]).
Have you tried to import using below snippet?
import { DeviceEventEmitter } from 'react-native';