jest-pnp-resolver
jest-pnp-resolver copied to clipboard
Incorrect peer dependency
[email protected] and above does not work with [email protected] and I would suggest adding jest 24.x to the list of peer dependencies
It throws the following in a CRA:
● Validation Error:
Module react-app-polyfill/jsdom in the setupFiles option was not found.
<rootDir> is: /foo/bar/my-project
Configuration Documentation:
https://jestjs.io/docs/configuration.html
Can you detail your setup? I've just tried running npx create-react-app hello-world --use-pnp
and the resulting project seemed to work fine.
Steps to replicate:
npx create-react-app test
cd test
npm run eject
that results in the following package.json
{
"jest": "^24.5.0",
"jest-pnp-resolver": "^1.2.1",
"jest-resolve": "^24.5.0",
...
}
Now...
npm run test # test suite runs fine...
npm outdated
> jest-pnp-resolver 1.0.2 1.0.2 1.2.1 test
npm i jest-pnp-resolver@latest # update jest-pnp-resolver
npm run test # test suite fails!!!
Hope this helps
To be clear, after installing the latest jest-pnp-resolver the JSON looks as follows:
{
"jest": "23.6.0",
"jest-pnp-resolver": "^1.2.1",
"jest-resolve": "23.6.0",
...
}
Were you able to fix it? I am getting the same error.
Module react-app-polyfill/jsdom in the setupFiles option was not found.
<rootDir> is: /Users/apple/Documents/Moonraft/Schroders/invest_iq
Configuration Documentation:
https://jestjs.io/docs/configuration```