jest-pnp-resolver icon indicating copy to clipboard operation
jest-pnp-resolver copied to clipboard

Incorrect peer dependency

Open glenveegee opened this issue 5 years ago • 4 comments

[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

glenveegee avatar Mar 14 '19 13:03 glenveegee

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.

arcanis avatar Mar 14 '19 13:03 arcanis

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

glenveegee avatar Mar 18 '19 23:03 glenveegee

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",
    ...
}

glenveegee avatar Mar 18 '19 23:03 glenveegee

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```

msgtobala avatar Nov 02 '21 16:11 msgtobala