Dependencies of this lib break TS on other apps #34

Open
opened 2022-07-23 18:52:15 +00:00 by GuillaumeHemmen · 0 comments
GuillaumeHemmen commented 2022-07-23 18:52:15 +00:00 (Migrated from github.com)

Description:

When installing this library on a recent project, it install dependencies that cause typescript to goes banana. This is due to the following dependence tree:

  • react-native-logging-tools@^1.3.0
    • @types/enzyme-adapter-react-16" "^1.0.6"
      • @types/enzyme" "*"
        • @types/react" "*"

Due to this wildcard (*), type/react install the latest version available (18.0.15), which messes up with the current project under React 17. This SO thread was what made me dig up the yarn.lock.

This issue is not coming directly from this lib, but this lib uses @types/enzyme-adapter-react-16, which causes this issue.

Temporary workaround

Update your yarn.lock manually to change the version of "@types/react@*"

Steps To Reproduce

  1. create a new expo project (for example) and include this lib. The project must be in typescript!
  2. add a component like a button.
  3. see the error appear

Expected Results

No error should appear.

Personal project at a given time before I manually downgrade my yarn.lock (access must be granted)

Description: When installing this library on a recent project, it install dependencies that cause typescript to goes banana. This is due to the following dependence tree: - react-native-logging-tools@^1.3.0 - @types/enzyme-adapter-react-16" "^1.0.6" - @types/enzyme" "*" - @types/react" "*" Due to this wildcard (*), type/react install the latest version available (18.0.15), which messes up with the current project under React 17. This [SO thread](https://stackoverflow.com/a/71835812/8790598) was what made me dig up the yarn.lock. This issue is not coming directly from this lib, but this lib uses `@types/enzyme-adapter-react-16`, which causes this issue. ## Temporary workaround Update your `yarn.lock` manually to change the version of `"@types/react@*"` ## Steps To Reproduce 1. create a new expo project (for example) and include this lib. The project must be in typescript! 2. add a component like a button. 3. see the error appear ## Expected Results No error should appear. ## Snack, code example, screenshot, or link to a repository: [Personal project at a given time before I manually downgrade my yarn.lock](https://gitlab.com/penelope-mobile/penepole-rn/-/commit/6d9e1beef1866934fe327d71773e338d95cec35e) (access must be granted)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openrn/react-native-logging-tools#34
No description provided.