React-hooks-testing-library: Cannot find module 'react-test-renderer'

Created on 25 Apr 2019  路  3Comments  路  Source: testing-library/react-hooks-testing-library

What is your question:

I'm getting an error Cannot find module 'react-test-renderer' from 'index.js' when I am executing my tests.
Currently I don't have react-test-renderer listed in my package.json. But I saw it as a peer dependency in the package.json of react-hooks-testing-library.

Do I have to install the peerDependency by my own?
I'm using v0.5

question

Most helpful comment

Yes. The reason it's a peer dependency is that it should be the same version as react, so we don't want to provide our own version and have them get out of sync.

All 3 comments

Yes. The reason it's a peer dependency is that it should be the same version as react, so we don't want to provide our own version and have them get out of sync.

thank you 馃帀maybe this should be added to the readme?

Yes, probably a good idea. Would including in the installation instructions be sufficient?

Happy if you want to contribute that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samuherek picture samuherek  路  3Comments

FredyC picture FredyC  路  3Comments

Schwartz10 picture Schwartz10  路  4Comments

jonkoops picture jonkoops  路  4Comments

ntucker picture ntucker  路  6Comments