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

Cannot find module 'filter-console' from 'node_modules/@testing-library/react-hooks/lib/core/console.js' #629

Closed
ohardy opened this issue May 25, 2021 · 3 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@ohardy
Copy link

ohardy commented May 25, 2021

  • react-hooks-testing-library version: 7.0.0
  • react version: 17.0.2
  • react-dom version (if applicable): 17.0.2
  • react-test-renderer version (if applicable): 17.0.2
  • node version: 16.2.0
  • npm (or yarn) version: 7.13.0

What you did:

Just upgraded to last version (7.0.0) and this issue just appear

What happened:

  ● Test suite failed to run

    Cannot find module 'filter-console' from 'node_modules/@testing-library/react-hooks/lib/core/console.js'

    Require stack:
      node_modules/@testing-library/react-hooks/lib/core/console.js
      node_modules/@testing-library/react-hooks/lib/index.js
      [path]/__tests__/fileToTest.test.ts

      at Resolver.resolveModule (../../node_modules/jest-resolve/build/index.js:311:11)
      at Object.<anonymous> (node_modules/@testing-library/react-hooks/lib/core/console.js:11:45)

Maybe it's related to this merge #624 no ?

Thanks

@ohardy ohardy added the bug Something isn't working label May 25, 2021
@mpeyper
Copy link
Member

mpeyper commented May 25, 2021

It's almost certainly related to #624, except that change removes the import for filter-console all together, so it shouldn't be trying to find it at all.

Can you try removing node_modules/@testing-library/react-hooks and reinstalling it?

I'll also try to reproduce it locally.

@ohardy
Copy link
Author

ohardy commented May 25, 2021

So sorry @mpeyper, you are right, cleaning everything and doing npm install again fixed that, closing this.

@ohardy ohardy closed this as completed May 25, 2021
@mpeyper
Copy link
Member

mpeyper commented May 25, 2021

Glad it was just that, otherwise I'd have to debug our whole release pipeline 😅

@mpeyper mpeyper added invalid This doesn't seem right and removed investigation required labels May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants