googlemaps / react-native-navigation-sdk

Apache License 2.0
25 stars 5 forks source link

React Native testing library incompatible with React version #217

Closed wangela closed 3 months ago

wangela commented 3 months ago

The npm publish action is blocked because npm install fails. It appears to involve incompatible dependency versions of @testing-library/react-native and react listed in package.json.


Please be sure to include as much information as possible:

Environment details

  1. Failing publish action log: https://github.com/googlemaps/react-native-navigation-sdk/actions/runs/10220172173/job/28280027082
  2. OS type and version Ubuntu 22.04.4 (ubuntu-latest in GitHub Actions runners)
  3. Library version and other environment information Node 20 (actions/setup-node@v4)

Steps to reproduce

  1. Install the latest versions of node and npm. nvm install node and npm install -g npm@latest
  2. From the root directory of this repo, run npm install

Output errors

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: react-native-navigation-sdk@0.4.0
npm error Found: react@18.2.0
npm error node_modules/react
npm error   dev react@"18.2.0" from the root project
npm error   peer react@">=16.8.0" from @testing-library/react-native@12.5.2
npm error   node_modules/@testing-library/react-native
npm error     dev @testing-library/react-native@"^12.5.0" from the root project
npm error   1 more (react-native)
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.3.1" from react-test-renderer@18.3.1
npm error node_modules/react-test-renderer
npm error   peer react-test-renderer@">=16.8.0" from @testing-library/react-native@12.5.2
npm error   node_modules/@testing-library/react-native
npm error     dev @testing-library/react-native@"^12.5.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.