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

[enzyme-adapter-react-16] fix import #2047

Merged
merged 1 commit into from Mar 13, 2019

Conversation

Projects
None yet
4 participants
@doronpr
Copy link

doronpr commented Mar 13, 2019

refs #2046

[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
@ljharb
Copy link
Member

ljharb left a comment

This would be broken. I’m importing the package.json, which absolutely works without an extension in node.

@ljharb ljharb force-pushed the doronpr:patch-1 branch from 2ecd9e5 to 9b964a8 Mar 13, 2019

@ljharb

This comment has been minimized.

Copy link
Member

ljharb commented Mar 13, 2019

I've replaced this PR with the contents of #2048.

@ljharb ljharb merged commit 9b964a8 into airbnb:master Mar 13, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ramchoudhary

This comment has been minimized.

Copy link

ramchoudhary commented on 9b964a8 Mar 14, 2019

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

This comment has been minimized.

Copy link
Member

ljharb replied Mar 14, 2019

@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.

This comment has been minimized.

Copy link

ramchoudhary replied Mar 14, 2019

@ljharb I'm using jest only with enzyme.

This comment has been minimized.

Copy link
Member

ljharb replied Mar 14, 2019

then check your jest config; either way, i should be fixed in v1.11.1.

This comment has been minimized.

Copy link

ramchoudhary replied Mar 14, 2019

Yeah mate! Just upgraded to v1.11.1 from v1.7.1 and now it working fine.
Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.