kulshekhar/ts-jest

Preset react-native not found.

JeremyBradshaw7 opened this issue · 1 comments

Getting the error

validation error: Preset react-native not found.

after upgrading React Native (typescript project) from 0.70 to 0.73. Everything is working except for the test suite. Whether I keep the same versions of jest, ts-jest, and babel-jest as before, or upgrade them to the latest versions, I'm getting the same error. I have followed the advice in https://kulshekhar.github.io/ts-jest/docs/guides/react-native but to no avail. Can anyone help?

Found the issue, I had a legacy resolutions part of my package.json file with these package specs (I cannot recall the reason why these were needed):

"resolutions": {
	"graceful-fs": "4.2.4",
	"@types/react": "^17"
}

Removing that allows the test to run as normal.