NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Update dependencies versions to match react 18

Open moxen-dev opened this issue 3 years ago • 9 comments

Description

I noticed that both @react-native-aria and @react-stately dependencies on the last version of Native Base are outdated and demanda React up to v17. I research both libraries and currently they already support react v18 in their last version (same major version used by native base).

I believe could be great if native base could update those two libraries.

Problem Statement

Because of this, I am facing some issues building a react native through expo caused by incompatible version of libraries. For example, I installed latest version of jest and it broke the build because it had conflict with react versions. Currently I need to npm i --force to pass which I believe is not ideal.

Proposed Solution or API

Well, since the libraries versions are on the same major version, i do not expect break changes so looks like the path to update both of them looks the first possible solution. I lack any knowledge if you already tried and if there are any problems ahead.

Alternatives

No response

Additional Information

No response

moxen-dev avatar Jan 31 '23 12:01 moxen-dev

Package-lock.json excerpts:

    "node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs": {
      "version": "3.0.0-alpha.2",
      "resolved": "https://registry.npmjs.org/@react-aria/tabs/-/tabs-3.0.0-alpha.2.tgz",
      "integrity": "sha512-yHpz1HujxBcMq8e4jrHkkowzrJwuVyssCB+DuA91kt6LC0eIMZsDZY9tEhhOq+TyOhI3nbyXaDKJG6y1qB0A5A==",
      "dependencies": {
        "@babel/runtime": "^7.6.2",
        "@react-aria/i18n": "^3.2.0",
        "@react-aria/interactions": "^3.3.2",
        "@react-aria/selection": "^3.3.1",
        "@react-aria/utils": "^3.4.1",
        "@react-stately/list": "^3.2.2",
        "@react-stately/tabs": "3.0.0-alpha.0",
        "@react-types/shared": "^3.2.1",
        "@react-types/tabs": "3.0.0-alpha.2"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0-rc.1"
      }
    },

And

    "node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs/node_modules/@react-stately/tabs": {
      "version": "3.0.0-alpha.0",
      "resolved": "https://registry.npmjs.org/@react-stately/tabs/-/tabs-3.0.0-alpha.0.tgz",
      "integrity": "sha512-QJZ9N7DT89RkP18btvQhJvxWuv/JkSwtm14ftfk+5LBbzyxyLsD2KP6jDrNhXgmkRMmIyEaMt2w2VmI6fQ6UAA==",
      "dependencies": {
        "@babel/runtime": "^7.6.2",
        "@react-stately/list": "^3.2.2",
        "@react-stately/utils": "^3.0.0-alpha.1",
        "@react-types/tabs": "3.0.0-alpha.2"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0-rc.1"
      }
    },
    "node_modules/@react-native-aria/tabs/node_modules/@react-stately/tabs": {
      "version": "3.0.0-alpha.1",
      "resolved": "https://registry.npmjs.org/@react-stately/tabs/-/tabs-3.0.0-alpha.1.tgz",
      "integrity": "sha512-aEG5lVLqmfx7A/dS5gkPXmD2ERAo69RtC0aHPo/Dw1XjzalYyo6QbQ5WtiuQxsCVx/naWGEJCcMEAD5/vt+cUQ==",
      "dependencies": {
        "@babel/runtime": "^7.6.2",
        "@react-stately/list": "^3.2.2",
        "@react-stately/utils": "^3.2.0",
        "@react-types/tabs": "3.0.0-alpha.2"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0-rc.1"
      }
    },
    "node_modules/@react-native-aria/tabs/node_modules/@react-types/tabs": {
      "version": "3.0.0-alpha.2",
      "resolved": "https://registry.npmjs.org/@react-types/tabs/-/tabs-3.0.0-alpha.2.tgz",
      "integrity": "sha512-HQNS2plzuNhKPo88OGEW2Ja9aLeiWqgNqEemSxh0KAjkA8IsvDGaoQEpr9ZQIyBZ3PQIljvOpEJ/IwHU5LztrQ==",
      "dependencies": {
        "@react-types/shared": "^3.2.1"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0-rc.1"
      }
    },
    "node_modules/native-base/node_modules/@react-stately/checkbox": {
      "version": "3.0.3",
      "resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.0.3.tgz",
      "integrity": "sha512-amT889DTLdbjAVjZ9j9TytN73PszynGIspKi1QSUCvXeA2OVyCwShxhV0Pn7yYX8cMinvGXrjhWdhn0nhYeMdg==",
      "dependencies": {
        "@babel/runtime": "^7.6.2",
        "@react-stately/toggle": "^3.2.3",
        "@react-stately/utils": "^3.2.2",
        "@react-types/checkbox": "^3.2.3"
      },
      "peerDependencies": {
        "react": "^16.8.0 || ^17.0.0-rc.1"
      }
    },

moxen-dev avatar Jan 31 '23 12:01 moxen-dev

same here, do we know any other fix than downgrading to lower react version?

nemvik avatar Mar 16 '23 20:03 nemvik

Outdated React dependency in native-base causing peer dependency warnings if using latest version of react.

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-aria/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-aria/[email protected]
npm WARN node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs
npm WARN   @react-aria/tabs@"3.0.0-alpha.2" from @react-native-aria/[email protected]
npm WARN   node_modules/@react-native-aria/tabs
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-aria/[email protected]
npm WARN   node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs
npm WARN     @react-aria/tabs@"3.0.0-alpha.2" from @react-native-aria/[email protected]
npm WARN     node_modules/@react-native-aria/tabs
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/@react-native-aria/tabs/node_modules/@react-stately/tabs
npm WARN   @react-stately/tabs@"3.0.0-alpha.1" from @react-native-aria/[email protected]
npm WARN   node_modules/@react-native-aria/tabs
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/@react-native-aria/tabs/node_modules/@react-stately/tabs
npm WARN     @react-stately/tabs@"3.0.0-alpha.1" from @react-native-aria/[email protected]
npm WARN     node_modules/@react-native-aria/tabs
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-types/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN node_modules/@react-native-aria/tabs/node_modules/@react-types/tabs
npm WARN   @react-types/tabs@"3.0.0-alpha.2" from @react-native-aria/[email protected]
npm WARN   node_modules/@react-native-aria/tabs
npm WARN   3 more (@react-aria/tabs, @react-stately/tabs, @react-stately/tabs)
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN   node_modules/@react-native-aria/tabs/node_modules/@react-types/tabs
npm WARN     @react-types/tabs@"3.0.0-alpha.2" from @react-native-aria/[email protected]
npm WARN     node_modules/@react-native-aria/tabs
npm WARN     3 more (@react-aria/tabs, @react-stately/tabs, @react-stately/tabs)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/checkbox
npm WARN   @react-stately/checkbox@"3.0.3" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/checkbox
npm WARN     @react-stately/checkbox@"3.0.3" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/collections
npm WARN   @react-stately/collections@"3.3.0" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/collections
npm WARN     @react-stately/collections@"3.3.0" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/combobox
npm WARN   @react-stately/combobox@"3.0.0-alpha.1" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/combobox
npm WARN     @react-stately/combobox@"3.0.0-alpha.1" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/radio
npm WARN   @react-stately/radio@"3.2.1" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/radio
npm WARN     @react-stately/radio@"3.2.1" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/slider
npm WARN   @react-stately/slider@"3.0.1" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/slider
npm WARN     @react-stately/slider@"3.0.1" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/tabs
npm WARN   @react-stately/tabs@"3.0.0-alpha.1" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/tabs
npm WARN     @react-stately/tabs@"3.0.0-alpha.1" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/toggle
npm WARN   @react-stately/toggle@"3.2.1" from [email protected]
npm WARN   node_modules/native-base
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/toggle
npm WARN     @react-stately/toggle@"3.2.1" from [email protected]
npm WARN     node_modules/native-base
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-stately/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs/node_modules/@react-stately/tabs
npm WARN   @react-stately/tabs@"3.0.0-alpha.0" from @react-aria/[email protected]
npm WARN   node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-stately/[email protected]
npm WARN   node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs/node_modules/@react-stately/tabs
npm WARN     @react-stately/tabs@"3.0.0-alpha.0" from @react-aria/[email protected]
npm WARN     node_modules/@react-native-aria/tabs/node_modules/@react-aria/tabs
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-types/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/combobox/node_modules/@react-types/combobox
npm WARN   @react-types/combobox@"3.0.0-alpha.1" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/combobox
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/combobox/node_modules/@react-types/combobox
npm WARN     @react-types/combobox@"3.0.0-alpha.1" from @react-stately/[email protected]
npm WARN     node_modules/native-base/node_modules/@react-stately/combobox
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @react-types/[email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"^18.2.0" from the root project
npm WARN   99 more (@amplitude/react-native, @react-aria/checkbox, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN node_modules/native-base/node_modules/@react-stately/tabs/node_modules/@react-types/tabs
npm WARN   @react-types/tabs@"3.0.0-alpha.2" from @react-stately/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/tabs
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8.0 || ^17.0.0-rc.1" from @react-types/[email protected]
npm WARN   node_modules/native-base/node_modules/@react-stately/tabs/node_modules/@react-types/tabs
npm WARN     @react-types/tabs@"3.0.0-alpha.2" from @react-stately/[email protected]
npm WARN     node_modules/native-base/node_modules/@react-stately/tabs

BernardKintzingSweep avatar Mar 23 '23 14:03 BernardKintzingSweep

Hi, Any update on this ?

arioul89 avatar Aug 11 '23 15:08 arioul89

Any updates?

YanaSyritskaya avatar Oct 11 '23 08:10 YanaSyritskaya

any solution facing same rn!!!

muhammadalizkhan avatar Oct 15 '23 05:10 muhammadalizkhan

Any updates?

mszczotarz-dev avatar Nov 07 '23 14:11 mszczotarz-dev

NativeBase is not supported anymore, so I don't think there will be updates.

Source: https://nativebase.io/blogs/road-ahead-with-gluestack-ui

The coming three to four months will be a bittersweet period for us — we are saying goodbye to NativeBase.

csabaxyz avatar Nov 07 '23 14:11 csabaxyz

Gluestack-ui has the same issue with the same peer dependencies.

ryan-pebk avatar Apr 22 '24 02:04 ryan-pebk