Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect peer dependency #7

Open
glenveegee opened this issue Mar 14, 2019 · 4 comments
Open

Incorrect peer dependency #7

glenveegee opened this issue Mar 14, 2019 · 4 comments

Comments

@glenveegee
Copy link

jest-pnp-resolver@1.2.0 and above does not work with jest@23.6.0 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

@arcanis
Copy link
Owner

arcanis commented Mar 14, 2019

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.

@glenveegee
Copy link
Author

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
Copy link
Author

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

@msgtobala
Copy link

msgtobala commented Nov 2, 2021

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

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

No branches or pull requests

3 participants