Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Fresh install of the template has a dependency issue #47

Open
bkotch opened this issue Dec 20, 2022 · 0 comments
Open

Fresh install of the template has a dependency issue #47

bkotch opened this issue Dec 20, 2022 · 0 comments

Comments

@bkotch
Copy link

bkotch commented Dec 20, 2022

I have been running aground trying to get jest running in expo post the release of 18.2.0

I found your excellent template and decided to follow in your footsteps

A fresh clone and npm install throws a very familiar error:

dooboo-expo % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"18.0.0" from the root project
npm ERR!   peer react@">=16.0.0" from @testing-library/[email protected]
npm ERR!   node_modules/@testing-library/jest-native
npm ERR!     dev @testing-library/jest-native@"^4.0.11" from the root project
npm ERR!   1 more (react-native)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^18.2.0" from [email protected]
npm ERR! node_modules/react-test-renderer
npm ERR!   dev react-test-renderer@"^18.2.0" from the root project
npm ERR!   peer react-test-renderer@">=16.0.0" from @testing-library/[email protected]
npm ERR!   node_modules/@testing-library/jest-native
npm ERR!     dev @testing-library/jest-native@"^4.0.11" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Same thing with ts-jest.

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/jest
npm ERR!   dev jest@"^29.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer jest@"^28.0.0" from [email protected]
npm ERR! node_modules/ts-jest
npm ERR!   dev ts-jest@"^28.0.8" from the root project
npm ERR! 

Changing ts-jest to match the jest version got npm. The tests run, at least, but the snapshots are failing

If it helps, running this on an M1. Been awhile since I had to fight with npm packages / react-native.

Hope it helps. Thanks for the excellent template <3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant