Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[enzyme-adapter-react-16] [fix] add an explicit
.json
extension
Some folks with broken jest configurations were seeing "'react-test-renderer/package' not found". Fixes #2046
- Loading branch information
9b964a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ljharb ,
Since yesterday, I'm getting "Cannot find module 'react-test-renderer/package' from 'ReactSixteenAdapter.js'" error in my bamboo build. It's working fine in local and it was working fine previously in bamboo as well. Do you think this change might have something to do with this?
Can you please have a look.
I'm using -
"react": "^16.6.3",
"react-dom": "^16.6.3",
"enzyme-adapter-react-16": "^1.7.1",
"react-test-renderer": "^16.2.0",
9b964a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramchoudhary this is fixed in v1.11.1, but it only broke for people using jest, with an invalid moduleFileExtensions (that omits
json
). Please file an issue if that's not the case for you.9b964a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ljharb I'm using jest only with enzyme.
9b964a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then check your jest config; either way, i should be fixed in v1.11.1.
9b964a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah mate! Just upgraded to v1.11.1 from v1.7.1 and now it working fine.
Thanks a lot.