Skip to content

Commit 12abfeb

Browse files
committed
Troubleshooting
1 parent 8f442f1 commit 12abfeb

1 file changed

Lines changed: 47 additions & 34 deletions

File tree

packages/docs-gesture-handler/docs/guides/troubleshooting.md renamed to packages/docs-gesture-handler/docs/guides/troubleshooting.mdx

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ title: Troubleshooting
44
sidebar_position: 3
55
---
66

7+
import Tabs from '@theme/Tabs';
8+
import TabItem from '@theme/TabItem';
9+
710
## Troubleshooting
811

912
Thanks for giving this library a try! We are sorry that you might have encountered issues though. Here is how you can seek help:
1013

1114
1. Search over the [issues on Github](https://github.com/software-mansion/react-native-gesture-handler/issues). There is a chance someone had this problem in the past and it has been resolved!
1215
2. When sure your problem hasn't been reported or was reported but the proposed solution doesn't work for you please follow [our issue reporting guidelines](#reporting-issues).
1316
3. You can try seeking help on [Software Mansion Discord](https://discord.com/invite/VemJ4df8Yr).
14-
4. If you feel like reading the source code I highly recommend it, as this is by far the best resource and gives you the most up to date insights into how the library works and what might be causing the bug.
17+
4. If you feel like reading the source code we highly recommend it, as this is by far the best resource and gives you the most up to date insights into how the library works and what might be causing the bug.
1518
5. If you managed to find the solution consider [contributing](/docs/#contributing) a fix or update our documentation to make this information easier to find for the others in the future.
1619

1720
## Reporting issues
1821

19-
This library is maintained by a very small team.
20-
Please be mindful of that when reporting issue and when it happens that we can't get back to you as soon as you might expect.
21-
We would love to fix all the problems as soon as possible, but often our time is constraint with other issues/features or projects.
22-
To make it easier for us to understand your issue and to be able to approach it sooner you can help by:
22+
This library is maintained by a very small team. Please keep this in mind when reporting issues, as we may not be able to respond as quickly as you might expect. We strive to address all problems as soon as possible, but our time is often constrained by other issues, features, or projects. To help us understand and address your issue more promptly, you can assist by:
2323

2424
- Making sure the issue description is complete. Please include all the details about your environment (library version, RN version, device OS etc).
2525
- It is the best to provide an example app that reproduces the issue you are having. Put it up on [gist](https://gist.github.com/), [snack](https://snack.expo.io) or create a repo on Github – it doesn't matter as long as we can easily pull it in, run and see the issue.
@@ -32,44 +32,57 @@ To make it easier for us to understand your issue and to be able to approach it
3232

3333
- Changing `enabled` prop during a gesture has no effect, only when a gesture starts (that is a finger touches the screen) the `enabled` prop is taken into consideration to decide whether to extract (or not) the gesture and provide it with stream of events to analyze.
3434
- `Native` gesture may not conform to the standard state flow due to platform specific workarounds to incorporate native views into RNGH.
35-
- Keep in mind that `Touchables` from RNGH are rendering two additional views that may need to be styled separately to achieve desired effect (`style` and `containerStyle` props).
36-
- In order for the gesture composition to work, all composed gestures must be attached to the same `GestureHandlerRootView`.
35+
- Keep in mind that [`Touchables`](/docs/components/touchables) from RNGH are rendering two additional views that may need to be styled separately to achieve desired effect (`style` and `containerStyle` props).
36+
- In order for the [gesture composition](/docs/fundamentals/gesture-composition) to work, all composed gestures must be attached to the same `GestureHandlerRootView`.
37+
38+
## Multiple instances of Gesture Handler were detected
39+
40+
This error usually happens when in your project there exists more than one instance of Gesture Handler. It can occur when some of your dependencies have installed Gesture Handler inside their own `node_modules` instead of using it as a peer dependency. In this case two different versions of Gesture Handler JS module try to install the same Native Module.
3741

38-
### Multiple instances of Gesture Handler were detected
42+
You can resolve this problem manually by modifying your `package.json` file. This will depend on the package manager you are using.
3943

40-
This error usually happens when in your project there exists more than one instance of Gesture Handler. It can occur when some of your dependencies have installed Gesture Handler inside their own `node_modules` instead of using it as a peer dependency. In this case two different versions of Gesture Handler JS module try to install the same Native Module. You can resolve this problem manually by modifying your `package.json` file.
4144

42-
You can check which libraries are using Gesture Handler, for example, with the command:
45+
<Tabs groupId="package-managers">
46+
<TabItem value="npm" label="NPM">
47+
You can check which libraries are using Gesture Handler with the command:
48+
49+
```bash
50+
npm ls react-native-gesture-handler
51+
```
4352

44-
```bash
45-
npm ls react-native-gesture-handler
46-
yarn why react-native-gesture-handler
47-
```
53+
Add [`overrides`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) property.
4854

49-
If you use `yarn` you should add [`resolution` property](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/).
55+
```json
56+
"overrides": {
57+
"react-native-gesture-handler": <Gesture Handler version>
58+
}
59+
```
5060

51-
```json
52-
"resolutions": {
53-
"react-native-gesture-handler": <Gesture Handler version>
54-
}
55-
```
61+
After that you need to run your package manager again:
5662

57-
If you use `npm` you should add [`overrides` property](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides).
63+
```bash
64+
npm install
65+
```
66+
</TabItem>
67+
<TabItem value="yarn" label="YARN">
68+
You can check which libraries are using Gesture Handler with the command:
5869

59-
```json
60-
"overrides": {
61-
"react-native-gesture-handler": <Gesture Handler version>
62-
}
63-
```
70+
```bash
71+
yarn why react-native-gesture-handler
72+
```
6473

65-
After that you need to run your package manager again
74+
Add [`resolutions`](https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/) property.
6675

67-
```bash
68-
yarn
69-
```
76+
```json
77+
"resolutions": {
78+
"react-native-gesture-handler": <Gesture Handler version>
79+
}
80+
```
7081

71-
or
82+
After that you need to run your package manager again:
7283

73-
```bash
74-
npm install
75-
```
84+
```bash
85+
yarn
86+
```
87+
</TabItem>
88+
</Tabs>

0 commit comments

Comments
 (0)