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

[3.0.0-alpha.0 upgrade] can't resolve react-testing-library #3431

Closed
MohammedFaragallah opened this issue Jul 20, 2019 · 6 comments
Closed
Assignees
Labels

Comments

@MohammedFaragallah
Copy link
Contributor

Thank you very much for this alpha release i think it will be very helpful

after upgrading
react-admin => 3.0.0-alpha.0
@material-ui/core => 4.2.1
@material-ui/icons => 4.2.1

i got this error

ra-core/esm/util/renderWithRedux.js
Module not found: Can't resolve 'react-testing-library'

i tried to install it but i got another error

Error: 🚨 react-testing-library has moved to @testing-library/react. Please uninstall react-testing-library and install @testing-library/react instead, or use an older version of react-testing-library. Learn more about this change here: testing-library/dom-testing-library#260 Thanks! :)

@smeng9
Copy link
Contributor

smeng9 commented Jul 21, 2019

I yarn add the react-testing-library@6.1.2 as a temporary solution

@djhi
Copy link
Collaborator

djhi commented Jul 21, 2019

We should probably extract those test utilities in a separate package installable as a dev dependency

@fzaninotto
Copy link
Member

We already used react-testing-library in master. the difference is that we now export renderWithRedux, which depends on react-testing-library. So this package must be in dependencies rather than devDependencies in next. I'm marking this a s a bug.

@fzaninotto
Copy link
Member

Fixed by #3442

@wmonecke
Copy link

wmonecke commented Aug 23, 2020

@fzaninotto When will this push to npm?

I got the following error and don't know if it is related:

Error in ./~/@testing-library/react/dist/index.js
Module parse failed: /Users/.../moodmana/node_modules/@testing-library/react/dist/index.js Unexpected token (48:22)
You may need an appropriate loader to handle this file type.
SyntaxError: Unexpected token (48:22)
 @ ./~/ra-core/lib/util/renderWithRedux.js 25:14-47

@fzaninotto
Copy link
Member

This was published in version 3.0 on November 20, 2019. https://github.com/marmelab/react-admin/releases/tag/v3.0.0

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

No branches or pull requests

6 participants